Examples of RedundantEditLogInputStream


Examples of com.alimama.mdrill.editlog.read.RedundantEditLogInputStream

      } else {
        long accFirstTxId = acc.get(0).getFirstTxId();
        if (accFirstTxId == elis.getFirstTxId()) {
          acc.add(elis);
        } else if (accFirstTxId < elis.getFirstTxId()) {
          outStreams.add(new RedundantEditLogInputStream(acc, fromTxId));
          acc.clear();
          acc.add(elis);
        } else if (accFirstTxId > elis.getFirstTxId()) {
          throw new RuntimeException("sorted set invariants violated!  " +
              "Got stream with first txid " + elis.getFirstTxId() +
              ", but the last firstTxId was " + accFirstTxId);
        }
      }
    }
    if (!acc.isEmpty()) {
      outStreams.add(new RedundantEditLogInputStream(acc, fromTxId));
      acc.clear();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.RedundantEditLogInputStream

  /**
   * Get underlying streams.
   */
  URLLogInputStream[] getStreams(EditLogInputStream str) throws Exception {
    // there is a single redundant stream
    RedundantEditLogInputStream relis = (RedundantEditLogInputStream) str;
    Field streamsF = RedundantEditLogInputStream.class.getDeclaredField("streams");
    streamsF.setAccessible(true);
    EditLogInputStream[] underlyingStreams = (EditLogInputStream[])streamsF.get(relis);
    URLLogInputStream[] urlStreams = new URLLogInputStream[underlyingStreams.length];
    int i = 0;
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.RedundantEditLogInputStream

  /**
   * Get the journal node we are tailing from, and indicate which stream this is.
   */
  private JournalNode getTailingJN(EditLogInputStream str,
      URLLogInputStream[] tailingStream) throws Exception {
    RedundantEditLogInputStream is = (RedundantEditLogInputStream) str;

    Field curIdxF = RedundantEditLogInputStream.class
        .getDeclaredField("curIdx");
    curIdxF.setAccessible(true);
    int curIdx = curIdxF.getInt(is);
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.