@Override
  public Config loadConfig(OptionSet options) {
    Config config = super.loadConfig(options);
    // get the db name
    if (options.has(dbNameArgument)) {
      dbName = options.valueOf(dbNameArgument);
    } else {
      log.error("Please specify DB Name using --db-name");
      System.exit(-1);
    }
    // get the db location
    if (options.has(dbPathArgument)) {
      dbPath = options.valueOf(dbPathArgument);
    } else {
      log.error("Please specify DB path using --db-path");
      System.exit(-1);
    }
    log.debug("Will read the RocksDb store " + dbName + " in " + dbPath);

    // get the key value
    int keyTypeOptions = 0;
    if (options.has(integerKeyArgu)) {
      key = options.valuesOf(integerKeyArgu);
      keyTypeOptions++;
    }
    if (options.has(longKeyArgu)) {
      key = options.valuesOf(longKeyArgu);
      keyTypeOptions++;
    }
    if (options.has(stringKeyArgu)) {
      key = options.valuesOf(stringKeyArgu);
      keyTypeOptions++;
    }

    if (keyTypeOptions > 1) {
      log.error("Found more than 1 type of key. Please specify only one type of key to use.");
      System.exit(-1);
    }

    if (key == null) {
      log.error("Can not find the key. Please specify the type of key to use");
      System.exit(-1);
    }
    return config;
  }
Commandline tool to get the value of a given key from the RocksDb.
samza-kv-rocksdb/src/main/java/org/apache/samza/storage/kv/RocksDbReadingTool.java