test_class.declarator: log = LoggerFactory.getLogger(DataStoreCommandTest.class)
test_class.modifier: private static
test_class.original_string: private static Logger log = LoggerFactory.getLogger(DataStoreCommandTest.class);
test_class.type: Logger
test_class.var_name: log
test_class.declarator: temporaryFolder = new TemporaryFolder(new File("target"))
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final TemporaryFolder temporaryFolder = new TemporaryFolder(new File("target"));
test_class.type: TemporaryFolder
test_class.var_name: temporaryFolder
test_class.declarator: blobFixture
test_class.modifier: private
test_class.original_string: private DataStoreFixture blobFixture;
test_class.type: DataStoreFixture
test_class.var_name: blobFixture
test_class.declarator: storeFixture
test_class.modifier: private
test_class.original_string: private StoreFixture storeFixture;
test_class.type: StoreFixture
test_class.var_name: storeFixture
test_class.declarator: additionalParams
test_class.modifier: private
test_class.original_string: private String additionalParams;
test_class.type: String
test_class.var_name: additionalParams
test_class.declarator: setupDataStore
test_class.modifier: private
test_class.original_string: private DataStoreBlobStore setupDataStore;
test_class.type: DataStoreBlobStore
test_class.var_name: setupDataStore
test_class.declarator: store
test_class.modifier: private
test_class.original_string: private NodeStore store;
test_class.type: NodeStore
test_class.var_name: store
test_class.file: oak-run/src/test/java/org/apache/jackrabbit/oak/run/DataStoreCommandTest.java
test_class.identifier: DataStoreCommandTest
test_case.body: @Test
      public void testNoSensitiveParams() throws Exception {
          storeFixture.close();
          File dump = temporaryFolder.newFolder();
          List<String> argsList = Lists
              .newArrayList("--check-consistency", "--" + getOption(blobFixture.getType()), blobFixture.getConfigPath(), "--out-dir",
                  dump.getAbsolutePath(), storeFixture.getConnectionString(), "--reset-log-config", "false", "--work-dir",
                  temporaryFolder.newFolder().getAbsolutePath());
          if (!Strings.isNullOrEmpty(additionalParams)) {
              argsList.add(additionalParams);
          }
  
          log.info("Running testNoSensitiveParams: {}", argsList);
          LogCustomizer customLogs = LogCustomizer
              .forLogger(DataStoreCommand.class.getName())
              .enable(Level.INFO)
              .filter(Level.INFO)
              .matchesRegex(".*mongodb:.*|.*az:.*")
              .create();
          customLogs.starting();
  
          DataStoreCommand cmd = new DataStoreCommand();
          try {
              cmd.execute(argsList.toArray(new String[0]));
          } catch (Exception e) {
              log.error("", e);
          }
  
          Assert.assertEquals(0, customLogs.getLogs().size());
          customLogs.finished();
      }
test_case.class_method_signature: DataStoreCommandTest.testNoSensitiveParams()
test_case.full_signature: @Test public void testNoSensitiveParams()
test_case.identifier: testNoSensitiveParams
test_case.invocations: close newFolder newArrayList getOption getType getConfigPath getAbsolutePath getConnectionString getAbsolutePath newFolder isNullOrEmpty add info create matchesRegex filter enable forLogger getName starting execute toArray error assertEquals size getLogs finished
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNoSensitiveParams()
focal_class.declarator: log = LoggerFactory.getLogger(DataStoreCommand.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(DataStoreCommand.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: NAME = "datastore"
focal_class.modifier: public static final
focal_class.original_string: public static final String NAME = "datastore";
focal_class.type: String
focal_class.var_name: NAME
focal_class.declarator: summary = "Provides DataStore management operations"
focal_class.modifier: private static final
focal_class.original_string: private static final String summary = "Provides DataStore management operations";
focal_class.type: String
focal_class.var_name: summary
focal_class.declarator: DELIM = ","
focal_class.modifier: private static final
focal_class.original_string: private static final String DELIM = ",";
focal_class.type: String
focal_class.var_name: DELIM
focal_class.declarator: opts
focal_class.modifier: private
focal_class.original_string: private Options opts;
focal_class.type: Options
focal_class.var_name: opts
focal_class.declarator: dataStoreOpts
focal_class.modifier: private
focal_class.original_string: private DataStoreOptions dataStoreOpts;
focal_class.type: DataStoreOptions
focal_class.var_name: dataStoreOpts
focal_class.declarator: idComparator = new Comparator<String>() {
          @Override public int compare(String s1, String s2) {
              return s1.split(DELIM)[0].compareTo(s2.split(DELIM)[0]);
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Comparator<String> idComparator = new Comparator<String>() {
          @Override public int compare(String s1, String s2) {
              return s1.split(DELIM)[0].compareTo(s2.split(DELIM)[0]);
          }
      };
focal_class.type: Comparator<String>
focal_class.var_name: idComparator
focal_class.file: oak-run/src/main/java/org/apache/jackrabbit/oak/run/DataStoreCommand.java
focal_class.identifier: DataStoreCommand
focal_class.interfaces: implements Command
focal_class.class_method_signature: DataStoreCommand.execute(String... args)
focal_class.full_signature: @Override public void execute(String... args)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (String... args)
focal_class.return: void
focal_class.signature: void execute(String... args)
focal_class.class_method_signature: DataStoreCommand.checkParameters(DataStoreOptions dataStoreOpts, Options opts, NodeStoreFixture fixture,
          OptionParser parser)
focal_class.full_signature: private static boolean checkParameters(DataStoreOptions dataStoreOpts, Options opts, NodeStoreFixture fixture,
          OptionParser parser)
focal_class.identifier: checkParameters
focal_class.modifiers: private static
focal_class.parameters: (DataStoreOptions dataStoreOpts, Options opts, NodeStoreFixture fixture,
          OptionParser parser)
focal_class.return: boolean
focal_class.signature: boolean checkParameters(DataStoreOptions dataStoreOpts, Options opts, NodeStoreFixture fixture,
          OptionParser parser)
focal_class.class_method_signature: DataStoreCommand.execute(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts, Options opts, Closer closer)
focal_class.full_signature: private void execute(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts, Options opts, Closer closer)
focal_class.identifier: execute
focal_class.modifiers: private
focal_class.parameters: (NodeStoreFixture fixture, DataStoreOptions dataStoreOpts, Options opts, Closer closer)
focal_class.return: void
focal_class.signature: void execute(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts, Options opts, Closer closer)
focal_class.class_method_signature: DataStoreCommand.setupDirectories(DataStoreOptions opts)
focal_class.full_signature: private static void setupDirectories(DataStoreOptions opts)
focal_class.identifier: setupDirectories
focal_class.modifiers: private static
focal_class.parameters: (DataStoreOptions opts)
focal_class.return: void
focal_class.signature: void setupDirectories(DataStoreOptions opts)
focal_class.class_method_signature: DataStoreCommand.getMetadata(NodeStoreFixture fixture)
focal_class.full_signature: private static List<String> getMetadata(NodeStoreFixture fixture)
focal_class.identifier: getMetadata
focal_class.modifiers: private static
focal_class.parameters: (NodeStoreFixture fixture)
focal_class.return: List<String>
focal_class.signature: List<String> getMetadata(NodeStoreFixture fixture)
focal_class.class_method_signature: DataStoreCommand.getCollector(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts,
          Options opts, Closer closer)
focal_class.full_signature: private static MarkSweepGarbageCollector getCollector(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts,
          Options opts, Closer closer)
focal_class.identifier: getCollector
focal_class.modifiers: private static
focal_class.parameters: (NodeStoreFixture fixture, DataStoreOptions dataStoreOpts,
          Options opts, Closer closer)
focal_class.return: MarkSweepGarbageCollector
focal_class.signature: MarkSweepGarbageCollector getCollector(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts,
          Options opts, Closer closer)
focal_class.class_method_signature: DataStoreCommand.getRetriever(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts,
          Options opts)
focal_class.full_signature: private static BlobReferenceRetriever getRetriever(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts,
          Options opts)
focal_class.identifier: getRetriever
focal_class.modifiers: private static
focal_class.parameters: (NodeStoreFixture fixture, DataStoreOptions dataStoreOpts,
          Options opts)
focal_class.return: BlobReferenceRetriever
focal_class.signature: BlobReferenceRetriever getRetriever(NodeStoreFixture fixture, DataStoreOptions dataStoreOpts,
          Options opts)
focal_class.class_method_signature: DataStoreCommand.retrieveBlobIds(GarbageCollectableBlobStore blobStore, File blob)
focal_class.full_signature: private static void retrieveBlobIds(GarbageCollectableBlobStore blobStore, File blob)
focal_class.identifier: retrieveBlobIds
focal_class.modifiers: private static
focal_class.parameters: (GarbageCollectableBlobStore blobStore, File blob)
focal_class.return: void
focal_class.signature: void retrieveBlobIds(GarbageCollectableBlobStore blobStore, File blob)
focal_class.class_method_signature: DataStoreCommand.verboseIds(BlobStoreOptions blobOpts, File readFile, File writeFile)
focal_class.full_signature: private static void verboseIds(BlobStoreOptions blobOpts, File readFile, File writeFile)
focal_class.identifier: verboseIds
focal_class.modifiers: private static
focal_class.parameters: (BlobStoreOptions blobOpts, File readFile, File writeFile)
focal_class.return: void
focal_class.signature: void verboseIds(BlobStoreOptions blobOpts, File readFile, File writeFile)
focal_class.class_method_signature: DataStoreCommand.setupLogging(DataStoreOptions dataStoreOpts)
focal_class.full_signature: protected static void setupLogging(DataStoreOptions dataStoreOpts)
focal_class.identifier: setupLogging
focal_class.modifiers: protected static
focal_class.parameters: (DataStoreOptions dataStoreOpts)
focal_class.return: void
focal_class.signature: void setupLogging(DataStoreOptions dataStoreOpts)
focal_class.class_method_signature: DataStoreCommand.shutdownLogging()
focal_class.full_signature: private static void shutdownLogging()
focal_class.identifier: shutdownLogging
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdownLogging()
focal_class.class_method_signature: DataStoreCommand.logCliArgs(String[] args)
focal_class.full_signature: private static void logCliArgs(String[] args)
focal_class.identifier: logCliArgs
focal_class.modifiers: private static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void logCliArgs(String[] args)
focal_class.class_method_signature: DataStoreCommand.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_method.body: @Override public void execute(String... args) throws Exception {
          OptionParser parser = new OptionParser();
  
          opts = new Options();
          opts.setCommandName(NAME);
          opts.setSummary(summary);
          opts.setConnectionString(CommonOptions.DEFAULT_CONNECTION_STRING);
          opts.registerOptionsFactory(DataStoreOptions.FACTORY);
          opts.parseAndConfigure(parser, args);
  
          dataStoreOpts = opts.getOptionBean(DataStoreOptions.class);
  
          //Clean up before setting up NodeStore as the temp
          //directory might be used by NodeStore for cache stuff like persistentCache
          setupDirectories(dataStoreOpts);
          setupLogging(dataStoreOpts);
  
          logCliArgs(args);
  
          boolean success = false;
          try (Closer closer = Utils.createCloserWithShutdownHook()) {
              opts.setTempDirectory(dataStoreOpts.getWorkDir().getAbsolutePath());
              NodeStoreFixture fixture = NodeStoreFixtureProvider.create(opts);
              closer.register(fixture);
  
              if (!checkParameters(dataStoreOpts, opts, fixture, parser)) {
                  return;
              }
              execute(fixture, dataStoreOpts, opts, closer);
              success = true;
          } catch (Throwable e) {
              log.error("Error occurred while performing datastore operation", e);
              e.printStackTrace(System.err);
          } finally {
              shutdownLogging();
          }
  
          if (!success) {
              System.exit(1);
          }
      }
focal_method.class_method_signature: DataStoreCommand.execute(String... args)
focal_method.full_signature: @Override public void execute(String... args)
focal_method.identifier: execute
focal_method.invocations: setCommandName setSummary setConnectionString registerOptionsFactory parseAndConfigure getOptionBean setupDirectories setupLogging logCliArgs createCloserWithShutdownHook setTempDirectory getAbsolutePath getWorkDir create register checkParameters execute error printStackTrace shutdownLogging exit
focal_method.modifiers: @Override public
focal_method.parameters: (String... args)
focal_method.return: void
focal_method.signature: void execute(String... args)