Package org.apache.accumulo.core.tabletserver.thrift

Examples of org.apache.accumulo.core.tabletserver.thrift.LogFile


  @Override
  public LogFile create(TInfo info, AuthInfo credentials, String tserverSession) throws ThriftSecurityException {
    if (closed)
      throw new RuntimeException("Logger is closed");
    long t1 = System.currentTimeMillis();
    LogFile result = new LogFile();
    result.id = random.nextLong();
    while (logs.get(result.id) != null)
      result.id = random.nextLong();
    result.name = UUID.randomUUID().toString();
    Logger out = null;
View Full Code Here


 
  // Fake placeholder for logs used during recovery
  public RemoteLogger(String logger, String filename, UUID tserverUUID) {
    this.client = null;
    this.logger = logger;
    this.logFile = new LogFile(filename, -1);
    this.tserverSession = null;
  }
View Full Code Here

 
  // Fake placeholder for logs used during recovery
  public RemoteLogger(String logger, String filename, UUID tserverUUID) {
    this.client = null;
    this.logger = logger;
    this.logFile = new LogFile(filename, -1);
    this.tserverSession = null;
  }
View Full Code Here

  @Override
  public LogFile create(TInfo info, AuthInfo credentials, String tserverSession) throws ThriftSecurityException {
    if (closed)
      throw new RuntimeException("Logger is closed");
    long t1 = System.currentTimeMillis();
    LogFile result = new LogFile();
    result.id = random.nextLong();
    while (logs.get(result.id) != null)
      result.id = random.nextLong();
    result.name = UUID.randomUUID().toString();
    Logger out = null;
View Full Code Here

    cleanup(logFile);
  }
 
  @Test
  public void testMinorCompactionStarted() throws Exception {
    LogFile logFile = writer.create(null, CREDENTIALS, "");
    String fqfn = "/foo/bar";
    writer.minorCompactionStarted(null, logFile.id, 5, 23, fqfn);
    writer.close(null, logFile.id);
    SequenceFile.Reader dis = readOpen(logFile);
    LogFileKey key = new LogFileKey();
View Full Code Here

    cleanup(logFile);
  }
 
  @Test
  public void testDefineTablet() throws Exception {
    LogFile logFile = writer.create(null, CREDENTIALS, "");
    KeyExtent ke = new KeyExtent(new Text("table1"), new Text("zzzz"), new Text("aaaaa"));
    writer.defineTablet(null, logFile.id, 6, 31, ke.toThrift());
    writer.close(null, logFile.id);
    SequenceFile.Reader dis = readOpen(logFile);
    LogFileKey key = new LogFileKey();
View Full Code Here

    writer = null;
  }
 
  @Test
  public void testClose() throws Exception {
    LogFile logFile = writer.create(null, CREDENTIALS, "");
    writer.close(null, logFile.id);
    try {
      writer.close(null, logFile.id);
      fail("close didn't throw exception");
    } catch (NoSuchLogIDException ex) {
View Full Code Here

    new File("./" + logFile.name).delete();
  }
 
  @Test
  public void testCopy() throws Exception {
    LogFile logFile = writer.create(null, CREDENTIALS, "");
    Path mylog = new Path("mylog");
    fs.delete(mylog, true);
    assertTrue(!fs.exists(mylog));
    writer.startCopy(null, CREDENTIALS, logFile.name, "mylog", false);
    for (int i = 0; i < 100; i++) {
View Full Code Here

    return result;
  }
 
  @Test
  public void testCreate() throws Exception {
    LogFile logFile = writer.create(null, CREDENTIALS, "");
    writer.close(null, logFile.id);
    readOpen(logFile);
    cleanup(logFile);
  }
View Full Code Here

    cleanup(logFile);
  }
 
  @Test
  public void testLog() throws Exception {
    LogFile logFile = writer.create(null, CREDENTIALS, "");
    Mutation m = new Mutation(new Text("somerow"));
    m.put(new Text("cf1"), new Text("cq1"), new Value("value1".getBytes()));
    writer.log(null, logFile.id, 2, 42, m.toThrift());
    writer.close(null, logFile.id);
    SequenceFile.Reader dis = readOpen(logFile);
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.tabletserver.thrift.LogFile

Copyright © 2018 www.massapicom. 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.