Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo, mail # user - Should MapResourceExample Work Without Calling Run?


Copy link to this message
-
Should MapResourceExample Work Without Calling Run?
David Medinets 2013-02-09, 03:09
I am poking around and randomly commented out the run() call as shown below.

  public static void main(String[] args) throws Exception {
    File tmpDir = new File(FileUtils.getTempDirectory(), "macc-" +
UUID.randomUUID().toString());

    try {
      MiniAccumuloCluster la = new MiniAccumuloCluster(tmpDir, "pass1234");
      la.start();

      System.out.println("\n   ---- Running Mapred Against Accumulo\n");

      //run(la.getInstanceName(), la.getZooKeepers(), "pass1234", args);

      System.out.println("\n   ---- Ran Mapred Against Accumulo\n");

      la.stop();
    } finally {
      FileUtils.deleteQuietly(tmpDir);
    }
  }

With this change, I get the following exception which I did not
expect. Shouldn't the above code run cleanly?

java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:162)
at java.io.BufferedInputStream.read(BufferedInputStream.java:325)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:282)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:324)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:176)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:153)
at java.io.BufferedReader.readLine(BufferedReader.java:316)
at java.io.BufferedReader.readLine(BufferedReader.java:379)
at org.apache.accumulo.test.MiniAccumuloCluster$LogWriter.run(MiniAccumuloCluster.java:88)