Examples of readFields()


Examples of org.apache.accumulo.server.master.state.MergeInfo.readFields()

          return new MergeInfo();
        byte[] data = ZooReaderWriter.getInstance().getData(path, new Stat());
        DataInputBuffer in = new DataInputBuffer();
        in.reset(data, data.length);
        MergeInfo info = new MergeInfo();
        info.readFields(in);
        return info;
      } catch (KeeperException.NoNodeException ex) {
        log.info("Error reading merge state, it probably just finished");
        return new MergeInfo();
      } catch (Exception ex) {
View Full Code Here

Examples of org.apache.accumulo.server.master.tableOps.CompactRange.CompactionIterators.readFields()

        Hex hex = new Hex();
        ByteArrayInputStream bais = new ByteArrayInputStream(hex.decode(tokens[1].split("=")[1].getBytes(Constants.UTF8)));
        DataInputStream dis = new DataInputStream(bais);
       
        try {
          iters.readFields(dis);
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
       
        KeyExtent ke = new KeyExtent(extent.getTableId(), iters.getEndRow(), iters.getStartRow());
View Full Code Here

Examples of org.apache.accumulo.server.master.tableOps.CompactionIterators.readFields()

        Hex hex = new Hex();
        ByteArrayInputStream bais = new ByteArrayInputStream(hex.decode(tokens[1].split("=")[1].getBytes(Constants.UTF8)));
        DataInputStream dis = new DataInputStream(bais);

        try {
          iters.readFields(dis);
        } catch (IOException e) {
          throw new RuntimeException(e);
        }

        KeyExtent ke = new KeyExtent(extent.getTableId(), iters.getEndRow(), iters.getStartRow());
View Full Code Here

Examples of org.apache.accumulo.tserver.logger.LogFileKey.readFields()

    final LogFileValue value = new LogFileValue();
    int read = 0;

    while (true) {
      try {
        key.readFields(input);
        value.readFields(input);
        read++;
      } catch (EOFException ex) {
        break;
      }
View Full Code Here

Examples of org.apache.accumulo.tserver.logger.LogFileValue.readFields()

    int read = 0;

    while (true) {
      try {
        key.readFields(input);
        value.readFields(input);
        read++;
      } catch (EOFException ex) {
        break;
      }
    }
View Full Code Here

Examples of org.apache.giraph.comm.requests.WritableRequest.readFields()

    Class<? extends WritableRequest> writableRequestClass =
        type.getRequestClass();

    WritableRequest writableRequest =
        ReflectionUtils.newInstance(writableRequestClass, conf);
    writableRequest.readFields(inputStream);
    if (LOG.isDebugEnabled()) {
      LOG.debug("decode: Client " + writableRequest.getClientId() +
          ", requestId " + writableRequest.getRequestId() +
          ", " +  writableRequest.getType() + ", with size " +
          buffer.array().length + " took " +
View Full Code Here

Examples of org.apache.giraph.graph.GlobalStats.readFields()

    String finalizedCheckpointPath =
        getCheckpointBasePath(superstep) + CHECKPOINT_FINALIZED_POSTFIX;
    DataInputStream finalizedStream =
        fs.open(new Path(finalizedCheckpointPath));
    GlobalStats globalStats = new GlobalStats();
    globalStats.readFields(finalizedStream);
    updateCounters(globalStats);
    int prefixFileCount = finalizedStream.readInt();
    for (int i = 0; i < prefixFileCount; ++i) {
      String metadataFilePath =
          finalizedStream.readUTF() + CHECKPOINT_METADATA_POSTFIX;
View Full Code Here

Examples of org.apache.giraph.jython.wrappers.JythonWritableWrapper.readFields()

    foo2Val = wrappedFoo2.getPyObject().__getattr__("val");
    assertTrue(foo2Val instanceof PyInteger);
    val2 = (PyInteger) foo2Val;
    assertEquals(17, val2.getValue());

    wrappedFoo2.readFields(dis);

    foo2Val = wrappedFoo2.getPyObject().__getattr__("val");
    assertTrue(foo2Val instanceof PyInteger);
    val2 = (PyInteger) foo2Val;
    assertEquals(30, val2.getValue());
View Full Code Here

Examples of org.apache.giraph.master.MasterAggregatorHandler.readFields()

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    handler.write(new DataOutputStream(out));

    MasterAggregatorHandler restartedHandler =
        new MasterAggregatorHandler(conf, progressable);
    restartedHandler.readFields(
        new DataInputStream(new ByteArrayInputStream(out.toByteArray())));

    assertEquals(2, getAggregatorMap(restartedHandler).size());

    AggregatorWrapper<Writable> regularAgg =
View Full Code Here

Examples of org.apache.giraph.master.SuperstepClasses.readFields()

      String finalizedCheckpointPath = getSavedCheckpointBasePath(superstep) +
          CheckpointingUtils.CHECKPOINT_FINALIZED_POSTFIX;
      DataInputStream finalizedStream =
          getFs().open(new Path(finalizedCheckpointPath));
      globalStats.readFields(finalizedStream);
      superstepClasses.readFields(finalizedStream);
      getConfiguration().updateSuperstepClasses(superstepClasses);
      getServerData().resetMessageStores();

      for (int i = 0; i < partitions; i++) {
        int partitionId = checkpointStream.readInt();
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.