Examples of closeWriter()


Examples of org.apache.hadoop.mapreduce.jobhistory.JobHistory.closeWriter()

          new HashMap<JobACL, AccessControlList>();
      JobSubmittedEvent jse =
        new JobSubmittedEvent(jobId, "job", "user", 12345, "path", jobACLs,
        "default");
      jh.logEvent(jse, jobId);
      jh.closeWriter(jobId);

      // Corrupt the history file. User RawLocalFileSystem so that we
      // do keep the original CRC file intact.
      String historyFileName = jobId.toString() + "_" + "user";
      Path historyFilePath = new Path (historyDir.toString(), historyFileName);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.jobhistory.JobHistory.closeWriter()

    JobFinishedEvent jfe =
      new JobFinishedEvent(jobId, 12346, 1, 1, 0, 0, new Counters(),
          new Counters(), new Counters());
    jh.logEvent(jfe, jobId);
    jh.closeWriter(jobId);

    // Try to write one more event now, should not fail
    TaskID tid = TaskID.forName("task_200809171136_0001_m_000002");
    TaskFinishedEvent tfe =
      new TaskFinishedEvent(tid, 0, TaskType.MAP, "", null);
View Full Code Here

Examples of org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogWriter.closeWriter()

    LogValue logValue =
        new LogValue(Collections.singletonList(srcFileRoot.toString()),
            testContainerId, ugi.getShortUserName());

    logWriter.append(logKey, logValue);
    logWriter.closeWriter();

    // make sure permission are correct on the file
    FileStatus fsStatus =  fs.getFileStatus(remoteAppLogFile);
    Assert.assertEquals("permissions on log aggregation file are wrong"
      FsPermission.createImmutable((short) 0640), fsStatus.getPermission());
View Full Code Here

Examples of org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogWriter.closeWriter()

    // different user (probably symlink) and second one by the user itself.
    when(logValue.getUser()).thenReturn(randomUser).thenReturn(
        ugi.getShortUserName());
    logWriter.append(logKey, logValue);

    logWriter.closeWriter();
   
    BufferedReader in =
        new BufferedReader(new FileReader(new File(remoteAppLogFile
            .toUri().getRawPath())));
    String line;
View Full Code Here

Examples of org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogWriter.closeWriter()

    LogValue logValue =
        new LogValue(Collections.singletonList(srcFileRoot.toString()),
            testContainerId);

    logWriter.append(logKey, logValue);
    logWriter.closeWriter();

    LogReader logReader = new LogReader(conf, remoteAppLogFile);
    LogKey rLogKey = new LogKey();
    DataInputStream dis = logReader.next(rLogKey);
    Writer writer = new StringWriter();
View Full Code Here

Examples of org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogWriter.closeWriter()

    LogValue logValue =
        new LogValue(Collections.singletonList(srcFileRoot.toString()),
            testContainerId);

    logWriter.append(logKey, logValue);
    logWriter.closeWriter();

    // make sure permission are correct on the file
    FileStatus fsStatus =  fs.getFileStatus(remoteAppLogFile);
    Assert.assertEquals("permissions on log aggregation file are wrong"
      FsPermission.createImmutable((short) 0640), fsStatus.getPermission());
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderModel.closeWriter()

    public static void index(Model m) {
        IndexBuilderModel larqBuilder = new IndexBuilderString();
        //IndexBuilderModel larqBuilder = new IndexBuilderSubject();
        StmtIterator iter = m.listStatements();
        larqBuilder.indexStatements(iter);
        larqBuilder.closeWriter();

        LARQ.setDefaultIndex(larqBuilder.getIndex());
    }
}
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderModel.closeWriter()

        {
            String g = iter.next() ;
            index(larqBuilder, ds.getNamedModel(g)) ;
        }
       
        larqBuilder.closeWriter() ;
    }

    private void index(IndexBuilderModel larqBuilder, Model model)
    {
        StmtIterator sIter = model.listStatements() ;
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderModel.closeWriter()

                index(larqBuilder, dataset.getNamedModel(g)) ;
            }
        } catch (Exception e) {
            log.warn("Exception building the index: {}", e.getMessage()) ;
        } finally {
            if ( larqBuilder != null) larqBuilder.closeWriter() ;
            if ( directory != null ) try { directory.close() ; } catch (IOException e) { log.warn("Problems closing the Lucene directory.") ; }
        }
    }

    private static void index(IndexBuilderModel larqBuilder, Model model)
View Full Code Here

Examples of org.apache.jena.larq.IndexBuilderModel.closeWriter()

                index(larqBuilder, dataset.getNamedModel(g)) ;
            }
        } catch (Exception e) {
            log.warn("Exception building the index: {}", e.getMessage()) ;
        } finally {
            if ( larqBuilder != null) larqBuilder.closeWriter() ;
            if ( directory != null ) try { directory.close() ; } catch (IOException e) { log.warn("Problems closing the Lucene directory.") ; }
        }
    }

    private static void index(IndexBuilderModel larqBuilder, Model model)
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.