test_class.declarator: LOG = Logger.getLogger(TestDistCPBaseService.class)
test_class.modifier: private static
test_class.original_string: private static Logger LOG = Logger.getLogger(TestDistCPBaseService.class);
test_class.type: Logger
test_class.var_name: LOG
test_class.declarator: testRoot = new Path("/tmp/", this.getClass().getName())
test_class.original_string: Path testRoot = new Path("/tmp/", this.getClass().getName());
test_class.type: Path
test_class.var_name: testRoot
test_class.declarator: localFs
test_class.original_string: FileSystem localFs;
test_class.type: FileSystem
test_class.var_name: localFs
test_class.declarator: cluster
test_class.original_string: Cluster cluster;
test_class.type: Cluster
test_class.var_name: cluster
test_class.declarator: service = null
test_class.original_string: MirrorStreamService service = null;
test_class.type: MirrorStreamService
test_class.var_name: service
test_class.declarator: expectedFileName1 = "/tmp/com.inmobi.databus.distcp" +
        ".TestDistCPBaseService/data-file1"
test_class.original_string: String expectedFileName1 = "/tmp/com.inmobi.databus.distcp" +
        ".TestDistCPBaseService/data-file1";
test_class.type: String
test_class.var_name: expectedFileName1
test_class.declarator: expectedFileName2 = "/tmp/com.inmobi.databus.distcp" +
        ".TestDistCPBaseService/data-file2"
test_class.original_string: String expectedFileName2 = "/tmp/com.inmobi.databus.distcp" +
        ".TestDistCPBaseService/data-file2";
test_class.type: String
test_class.var_name: expectedFileName2
test_class.declarator: expectedConsumePaths = new HashSet<String>()
test_class.original_string: Set<String> expectedConsumePaths = new HashSet<String>();
test_class.type: Set<String>
test_class.var_name: expectedConsumePaths
test_class.file: databus-worker/src/test/java/com/inmobi/databus/distcp/TestDistCPBaseService.java
test_class.identifier: TestDistCPBaseService
test_case.body: @Test(priority = 2)
    public void testNegative() throws Exception {
      cleanUP();
      createInvalidData();
      Map<Path, FileSystem> consumePaths = new HashMap<Path, FileSystem>();
      Path p =  service.getDistCPInputFile(consumePaths, testRoot);
      //since all data is invalid
      //output of this function should be null
      assert p == null;
  
    }
test_case.class_method_signature: TestDistCPBaseService.testNegative()
test_case.full_signature: @Test(priority = 2) public void testNegative()
test_case.identifier: testNegative
test_case.invocations: cleanUP createInvalidData getDistCPInputFile
test_case.modifiers: @Test(priority = 2) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNegative()
focal_class.declarator: srcCluster
focal_class.modifier: private final
focal_class.original_string: private final Cluster srcCluster;
focal_class.type: Cluster
focal_class.var_name: srcCluster
focal_class.declarator: destCluster
focal_class.modifier: private final
focal_class.original_string: private final Cluster destCluster;
focal_class.type: Cluster
focal_class.var_name: destCluster
focal_class.declarator: srcFs
focal_class.modifier: private final
focal_class.original_string: private final FileSystem srcFs;
focal_class.type: FileSystem
focal_class.var_name: srcFs
focal_class.declarator: destFs
focal_class.modifier: private final
focal_class.original_string: private final FileSystem destFs;
focal_class.type: FileSystem
focal_class.var_name: destFs
focal_class.declarator: DISTCP_SUCCESS = DistCpConstants.SUCCESS
focal_class.modifier: protected static final
focal_class.original_string: protected static final int DISTCP_SUCCESS = DistCpConstants.SUCCESS;
focal_class.type: int
focal_class.var_name: DISTCP_SUCCESS
focal_class.declarator: LOG = LogFactory.getLog(DistcpBaseService
        .class)
focal_class.modifier: protected static final
focal_class.original_string: protected static final Log LOG = LogFactory.getLog(DistcpBaseService
        .class);
focal_class.type: Log
focal_class.var_name: LOG
focal_class.file: databus-worker/src/main/java/com/inmobi/databus/distcp/DistcpBaseService.java
focal_class.identifier: DistcpBaseService
focal_class.class_method_signature: DistcpBaseService.DistcpBaseService(DatabusConfig config, String name,
                             Cluster srcCluster,
                             Cluster destCluster)
focal_class.full_signature: public  DistcpBaseService(DatabusConfig config, String name,
                             Cluster srcCluster,
                             Cluster destCluster)
focal_class.identifier: DistcpBaseService
focal_class.modifiers: public
focal_class.parameters: (DatabusConfig config, String name,
                             Cluster srcCluster,
                             Cluster destCluster)
focal_class.signature:  DistcpBaseService(DatabusConfig config, String name,
                             Cluster srcCluster,
                             Cluster destCluster)
focal_class.class_method_signature: DistcpBaseService.getSrcCluster()
focal_class.full_signature: protected Cluster getSrcCluster()
focal_class.identifier: getSrcCluster
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: Cluster
focal_class.signature: Cluster getSrcCluster()
focal_class.class_method_signature: DistcpBaseService.getDestCluster()
focal_class.full_signature: protected Cluster getDestCluster()
focal_class.identifier: getDestCluster
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: Cluster
focal_class.signature: Cluster getDestCluster()
focal_class.class_method_signature: DistcpBaseService.getSrcFs()
focal_class.full_signature: protected FileSystem getSrcFs()
focal_class.identifier: getSrcFs
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: FileSystem
focal_class.signature: FileSystem getSrcFs()
focal_class.class_method_signature: DistcpBaseService.getDestFs()
focal_class.full_signature: protected FileSystem getDestFs()
focal_class.identifier: getDestFs
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: FileSystem
focal_class.signature: FileSystem getDestFs()
focal_class.class_method_signature: DistcpBaseService.getDistCpOptions(Path inputPathListing, Path target)
focal_class.full_signature: protected DistCpOptions getDistCpOptions(Path inputPathListing, Path target)
focal_class.identifier: getDistCpOptions
focal_class.modifiers: protected
focal_class.parameters: (Path inputPathListing, Path target)
focal_class.return: DistCpOptions
focal_class.signature: DistCpOptions getDistCpOptions(Path inputPathListing, Path target)
focal_class.class_method_signature: DistcpBaseService.executeDistCp(DistCpOptions options)
focal_class.full_signature: protected Boolean executeDistCp(DistCpOptions options)
focal_class.identifier: executeDistCp
focal_class.modifiers: protected
focal_class.parameters: (DistCpOptions options)
focal_class.return: Boolean
focal_class.signature: Boolean executeDistCp(DistCpOptions options)
focal_class.class_method_signature: DistcpBaseService.getInputPath()
focal_class.full_signature: protected abstract Path getInputPath()
focal_class.identifier: getInputPath
focal_class.modifiers: protected abstract
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path getInputPath()
focal_class.class_method_signature: DistcpBaseService.getCategoryFromFileName(String fileName)
focal_class.full_signature: protected String getCategoryFromFileName(String fileName)
focal_class.identifier: getCategoryFromFileName
focal_class.modifiers: protected
focal_class.parameters: (String fileName)
focal_class.return: String
focal_class.signature: String getCategoryFromFileName(String fileName)
focal_class.class_method_signature: DistcpBaseService.getMSecondsTillNextRun(long currentTime)
focal_class.full_signature: @Override public long getMSecondsTillNextRun(long currentTime)
focal_class.identifier: getMSecondsTillNextRun
focal_class.modifiers: @Override public
focal_class.parameters: (long currentTime)
focal_class.return: long
focal_class.signature: long getMSecondsTillNextRun(long currentTime)
focal_class.class_method_signature: DistcpBaseService.doFinalCommit(Map<Path, FileSystem> consumePaths)
focal_class.full_signature: protected void doFinalCommit(Map<Path, FileSystem> consumePaths)
focal_class.identifier: doFinalCommit
focal_class.modifiers: protected
focal_class.parameters: (Map<Path, FileSystem> consumePaths)
focal_class.return: void
focal_class.signature: void doFinalCommit(Map<Path, FileSystem> consumePaths)
focal_class.class_method_signature: DistcpBaseService.getDistCPInputFile(Map<Path, FileSystem> consumePaths,
                                      Path tmp)
focal_class.full_signature: protected Path getDistCPInputFile(Map<Path, FileSystem> consumePaths,
                                      Path tmp)
focal_class.identifier: getDistCPInputFile
focal_class.modifiers: protected
focal_class.parameters: (Map<Path, FileSystem> consumePaths,
                                      Path tmp)
focal_class.return: Path
focal_class.signature: Path getDistCPInputFile(Map<Path, FileSystem> consumePaths,
                                      Path tmp)
focal_class.class_method_signature: DistcpBaseService.readConsumePath(FileSystem fs,Path consumePath,
                                 Set<String>  minFilesSet)
focal_class.full_signature: private void readConsumePath(FileSystem fs,Path consumePath,
                                 Set<String>  minFilesSet)
focal_class.identifier: readConsumePath
focal_class.modifiers: private
focal_class.parameters: (FileSystem fs,Path consumePath,
                                 Set<String>  minFilesSet)
focal_class.return: void
focal_class.signature: void readConsumePath(FileSystem fs,Path consumePath,
                                 Set<String>  minFilesSet)
focal_class.class_method_signature: DistcpBaseService.getFinalPathForDistCP(Path tmpPath, Map<Path,
        FileSystem> consumePaths)
focal_class.full_signature: private Path getFinalPathForDistCP(Path tmpPath, Map<Path,
        FileSystem> consumePaths)
focal_class.identifier: getFinalPathForDistCP
focal_class.modifiers: private
focal_class.parameters: (Path tmpPath, Map<Path,
        FileSystem> consumePaths)
focal_class.return: Path
focal_class.signature: Path getFinalPathForDistCP(Path tmpPath, Map<Path,
        FileSystem> consumePaths)
focal_class.class_method_signature: DistcpBaseService.createInputFileForDISCTP(FileSystem fs, String clusterName,
                                          Path tmp, Set<String> minFilesSet)
focal_class.full_signature: private Path createInputFileForDISCTP(FileSystem fs, String clusterName,
                                          Path tmp, Set<String> minFilesSet)
focal_class.identifier: createInputFileForDISCTP
focal_class.modifiers: private
focal_class.parameters: (FileSystem fs, String clusterName,
                                          Path tmp, Set<String> minFilesSet)
focal_class.return: Path
focal_class.signature: Path createInputFileForDISCTP(FileSystem fs, String clusterName,
                                          Path tmp, Set<String> minFilesSet)
focal_class.superclass: extends AbstractService
focal_method.body: protected Path getDistCPInputFile(Map<Path, FileSystem> consumePaths,
                                      Path tmp) throws IOException {
      Path input = getInputPath();
      if (!srcFs.exists(input))
        return null;
      //find all consumePaths which need to be pulled
      FileStatus[] fileList = srcFs.listStatus(input);
      if (fileList != null) {
        Set<String> minFilesSet = new HashSet<String>();
        /* inputPath could have multiple files due to backlog
        * read all and create a Input file for DISTCP with valid paths on
        * destinationCluster as an optimization so that distcp doesn't pull
        * this file remotely
        */
        for (int i = 0; i < fileList.length; i++) {
          Path consumeFilePath = fileList[i].getPath().makeQualified(srcFs);
          /* put eachFile name in consumePaths
          * An example of data in consumePaths is
          * /databus/system/consumers/<cluster>/file1..and so on
          */
          consumePaths.put(consumeFilePath, srcFs);
  
          LOG.debug("Reading minutePaths from ConsumePath [" +
              consumeFilePath + "]");
          //read all valid minute files path in each consumePath
          readConsumePath(srcFs, consumeFilePath,
              minFilesSet);
        }
        Path tmpPath = createInputFileForDISCTP(destFs, srcCluster.getName(), tmp,
            minFilesSet);
        return getFinalPathForDistCP(tmpPath, consumePaths);
      }
  
      return null;
    }
focal_method.class_method_signature: DistcpBaseService.getDistCPInputFile(Map<Path, FileSystem> consumePaths,
                                      Path tmp)
focal_method.full_signature: protected Path getDistCPInputFile(Map<Path, FileSystem> consumePaths,
                                      Path tmp)
focal_method.identifier: getDistCPInputFile
focal_method.invocations: getInputPath exists listStatus makeQualified getPath put debug readConsumePath createInputFileForDISCTP getName getFinalPathForDistCP
focal_method.modifiers: protected
focal_method.parameters: (Map<Path, FileSystem> consumePaths,
                                      Path tmp)
focal_method.return: Path
focal_method.signature: Path getDistCPInputFile(Map<Path, FileSystem> consumePaths,
                                      Path tmp)