Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.MiniMRCluster.shutdown()


          counters.findCounter(TaskCounter.PHYSICAL_MEMORY_BYTES).getValue(),
          counters.findCounter(TaskCounter.COMMITTED_HEAP_BYTES).getValue(),
          true);
    } finally {
      // stop the MR cluster
      mrCluster.shutdown();
     
      if (ris != null) {
          ris.close();
      }
      if (parser != null) {
View Full Code Here


      logs = fs.globStatus(new Path(namenode+"/logs/part*"));
      assertTrue("Unexpected map count, logs.length=" + logs.length,
          logs.length == 1);
    } finally {
      if (dfs != null) { dfs.shutdown(); }
      if (mr != null) { mr.shutdown(); }
    }
  }

  public void testLimits() throws Exception {
    Configuration conf = new Configuration();
View Full Code Here

      LOG.info("After map/reduce completion");

      // verify map-reduce results
      verify(Bytes.toString(table.getTableName()));
    } finally {
      mrCluster.shutdown();
      if (job != null) {
        FileUtil.fullyDelete(
          new File(job.getConfiguration().get("hadoop.tmp.dir")));
      }
    }
View Full Code Here

      job.waitForCompletion(true);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } finally {
      mrCluster.shutdown();
      if (job != null) {
        FileUtil.fullyDelete(
          new File(job.getConfiguration().get("hadoop.tmp.dir")));
      }
    }
View Full Code Here

      IdentityTableReduce.initJob(TABLE_NAME, IdentityTableReduce.class, jobConf);

      JobClient.runJob(jobConf);
     
    } finally {
      mrCluster.shutdown();
    }
   
    System.out.println("Print table contents after map/reduce");
    scanTable(conf);
  }
View Full Code Here

      runProgram(mr, fs, new Path(cppExamples, "bin/wordcount-part"),
                 inputPath, outputPath, fixedPartitionOutput);
      runNonPipedProgram(mr, fs, new Path(cppExamples, "bin/wordcount-nopipe"));
      mr.waitUntilIdle();
    } finally {
      mr.shutdown();
      dfs.shutdown();
    }
  }

  final static String[] twoSplitOutput = new String[] {
View Full Code Here

      scanTable(SINGLE_REGION_TABLE_NAME, true);

      // verify map-reduce results
      verify(SINGLE_REGION_TABLE_NAME);
      } finally {
        mrCluster.shutdown();
      }
    } finally {
      table.close();
    }
  }
View Full Code Here

        JobClient.runJob(jobConf);

        // verify map-reduce results
        verify(MULTI_REGION_TABLE_NAME);
      } finally {
        mrCluster.shutdown();
      }
    } finally {
      table.close();
    }
  }
View Full Code Here

      jobConf.setOutputFormat(IndexOutputFormat.class);

      JobClient.runJob(jobConf);

    } finally {
      mrCluster.shutdown();
    }

    if (printResults) {
      LOG.info("Print table contents after map/reduce");
    }
View Full Code Here

      }
      assertEquals(cacheString + "\t", line);
      assertEquals(cacheString2 + "\t", line2);
    } finally{
      if (dfs != null) { dfs.shutdown(); }
      if (mr != null) { mr.shutdown();}
    }
  }

  public static void main(String[]args) throws Exception
  {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.