Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18197

Avoided to call job.waitForCompletion(true) two times

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.0.2, 1.2.0, 1.4.0
    • 1.4.0, 1.3.2, 1.2.7
    • None
    • None
    • Reviewed

    Description

      import.java, job output is printing two times.

      after job completed, job.waitForCompletion(true) is calling two times.

      Job job = createSubmittableJob(conf, otherArgs);
          boolean isJobSuccessful = job.waitForCompletion(true);
          if(isJobSuccessful){
            // Flush all the regions of the table
            flushRegionsIfNecessary(conf);
          }
          long inputRecords = job.getCounters().findCounter(TaskCounter.MAP_INPUT_RECORDS).getValue();
          long outputRecords = job.getCounters().findCounter(TaskCounter.MAP_OUTPUT_RECORDS).getValue();
          if (outputRecords < inputRecords) {
            System.err.println("Warning, not all records were imported (maybe filtered out).");
            if (outputRecords == 0) {
              System.err.println("If the data was exported from HBase 0.94 "+
                  "consider using -Dhbase.import.version=0.94.");
            }
          }
      
          System.exit(job.waitForCompletion(true) ? 0 : 1);
      

      Attachments

        1. HBASE-18197.branch-1.2.002.patch
          0.9 kB
          Jan Hentschel
        2. HBASE-18197.branch-1.2.001.patch
          0.9 kB
          Jan Hentschel
        3. HBASE-18197.branch-1.2.001.patch
          0.9 kB
          Jan Hentschel
        4. HBASE-18197.branch-1.0.001.patch
          0.9 kB
          Jan Hentschel
        5. HBASE-18197.branch-1.0.001.patch
          0.9 kB
          Jan Hentschel

        Activity

          People

            janh Jan Hentschel
            chandrasekharn Chandra Sekhar
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: