How to Run LoadJsonExample When the Store is Non-Secure

To execute LoadExampleJson when the store to contact is configured for non-secure access, type the following at the command line of the client node, which must have network connectivity with a node running the admin service of the non-secure store you deployed (for example, kv-host-1 itself):

cd /opt/oracle/nosql/apps/kv
java -classpath \
    /opt/oracle/kv-ee/lib/kvstore.jar:\
    /opt/oracle/kv-ee/lib/sklogger.jar:\
    /opt/oracle/kv-ee/lib/commonutil.jar:examples \
    [-Djava.util.logging.config.file=/opt/oracle/nosql/\
        apps/kv/examples/hadoop/hive/es/\
        example-logging.properties] \
    hadoop.hive.ex.table.LoadExampleJson \
    -store example-store -host kv-host-1 -port 5000 \
    -file /opt/oracle/nosql/apps/kv/examples/\
        hadoop/hive/ex/govtrack-senators-example.json \
    –table exampleJsonTable 
    [-delete]

The following parameters are required: -store, -host, -port, -file, and -table, whereas the -delete parameter is optional.

In the example command line above, the argument -file <filename> requests that the contents of the specified file be retrieved and then written as JSON data to the exampleJsonTable that is created in the store. For convenience, the file specified above is provided with the example distribution. You can examine the contents of that file to see all of the possible document attributes that you can query.

If LoadExampleJson is executed a second time and the optional -delete parameter is specified, then all rows added by any previous executions of LoadExampleJson are deleted from the table prior to adding the requested new rows. Otherwise, all pre-existing rows are left in place, and duplicate rows (with new id values) will be added to the table.