1

I tried creating a time series container on my Griddb client, but I got a connection time out error.

import griddb_python as griddb 
import sys 
factory = griddb.StoreFactory.get_instance() 
argv = sys.argv
try: 
  # Get GridStore object 
  gridstore = factory.get_store (host="192.168.11.19", port=31999, cluster 
  name="defaultCluster", username="admin", password="admin") 
  # When operations such as container creation and acquisition are performed, it is connected 
  to the cluster. 
  gridstore.get_container("containerName") print("Connect to Cluster") 

  # Create a timeseries container 

  conInfo = griddb.ContainerInfo(name="SamplePython timeseries1",column_info_list= 
                            [["date", griddb.Type.TIMESTAMP], ["value", griddb.Type.DOUBLE]], 
                            type=griddb.ContainerType.TIME_SERIES)

  ts = gridstore.put_container_info(conInfo)
  print("Create time series name = series.py")
  print("success!")

except griddb.GSException as e: 
  for i in range(e.get error stack size()): 
    print("[",i, "]") 
    print(e.get_error_code (i)) 
    print(e.get_location (1)) 
    print(e.get_message(i)) 

This code was run using linux (redhat, centOS) on my virtual box machine.

0 Answers0