Examples of StorageReport


Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

    DatanodeStorage getDnStorage() {
      return dnStorage;
    }

    synchronized StorageReport getStorageReport(String bpid) {
      return new StorageReport(dnStorage,
          false, getCapacity(), getUsed(), getFree(),
          map.get(bpid).getUsed());
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

    StorageReport[] reports;
    synchronized (statsLock) {
      reports = new StorageReport[volumes.volumes.size()];
      int i = 0;
      for (FsVolumeImpl volume : volumes.volumes) {
        reports[i++] = new StorageReport(volume.toDatanodeStorage(),
                                         false,
                                         volume.getCapacity(),
                                         volume.getDfsUsed(),
                                         volume.getAvailable(),
                                         volume.getBlockPoolUsed(bpid));
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

      DatanodeDescriptor dnd) {
    ArrayList<StorageReport> reports = new ArrayList<StorageReport>();
    for (DatanodeStorageInfo storage : dnd.getStorageInfos()) {
      DatanodeStorage dns = new DatanodeStorage(
          storage.getStorageID(), storage.getState(), storage.getStorageType());
      StorageReport report = new StorageReport(
          dns ,false, storage.getCapacity(),
          storage.getDfsUsed(), storage.getRemaining(),
          storage.getBlockPoolUsed());
      reports.add(report);
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

    DatanodeStorage dns1 = new DatanodeStorage("dnStorage1");
    DatanodeStorage dns2 = new DatanodeStorage("dnStorage2");

    StorageReport[] report1 = new StorageReport[] {
        new StorageReport(dns1, false, 1024, 100, 924, 100)
    };
    StorageReport[] report2 = new StorageReport[] {
        new StorageReport(dns2, false, 2500, 200, 1848, 200)
    };
    dnDesc1.updateHeartbeat(report1, 5L, 3L, 10, 2);
    dnDesc2.updateHeartbeat(report2, 10L, 2L, 20, 1);

    ArrayList<DatanodeDescriptor> live = new ArrayList<DatanodeDescriptor>();
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

  HeartbeatResponse sendHeartBeat() throws IOException {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Sending heartbeat from service actor: " + this);
    }
    // reports number of failed volumes
    StorageReport[] report = { new StorageReport(bpRegistration.getStorageID(),
        false,
        dn.getFSDataset().getCapacity(),
        dn.getFSDataset().getDfsUsed(),
        dn.getFSDataset().getRemaining(),
        dn.getFSDataset().getBlockPoolUsed(bpos.getBlockPoolId())) };
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

    try {
      List<StorageReportProto> list = request.getReportsList();
      StorageReport[] report = new StorageReport[list.size()];
      int i = 0;
      for (StorageReportProto p : list) {
        report[i++] = new StorageReport(p.getStorageID(), p.getFailed(),
            p.getCapacity(), p.getDfsUsed(), p.getRemaining(),
            p.getBlockPoolUsed());
      }
      response = impl.sendHeartbeat(PBHelper.convert(request.getRegistration()),
          report, request.getXmitsInProgress(), request.getXceiverCount(),
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

     * Ignore reply commands.
     */
    void sendHeartbeat() throws IOException {
      // register datanode
      // TODO:FEDERATION currently a single block pool is supported
      StorageReport[] rep = { new StorageReport(storage, false,
          DF_CAPACITY, DF_USED, DF_CAPACITY - DF_USED, DF_USED) };
      DatanodeCommand[] cmds = nameNodeProto.sendHeartbeat(dnRegistration, rep,
          0L, 0L, 0, 0, 0).getCommands();
      if(cmds != null) {
        for (DatanodeCommand cmd : cmds ) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

     * Send a heartbeat to the name-node and replicate blocks if requested.
     */
    @SuppressWarnings("unused") // keep it for future blockReceived benchmark
    int replicateBlocks() throws IOException {
      // register datanode
      StorageReport[] rep = { new StorageReport(storage,
          false, DF_CAPACITY, DF_USED, DF_CAPACITY - DF_USED, DF_USED) };
      DatanodeCommand[] cmds = nameNodeProto.sendHeartbeat(dnRegistration,
          rep, 0L, 0L, 0, 0, 0).getCommands();
      if (cmds != null) {
        for (DatanodeCommand cmd : cmds) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

        .setStorage(convert(r.getStorage()));
    return builder.build();
  }

  public static StorageReport convert(StorageReportProto p) {
    return new StorageReport(
        p.hasStorage() ?
            convert(p.getStorage()) :
            new DatanodeStorage(p.getStorageUuid()),
        p.getFailed(), p.getCapacity(), p.getDfsUsed(), p.getRemaining(),
        p.getBlockPoolUsed());
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.StorageReport

     * Ignore reply commands.
     */
    void sendHeartbeat() throws IOException {
      // register datanode
      // TODO:FEDERATION currently a single block pool is supported
      StorageReport[] rep = { new StorageReport(dnRegistration.getStorageID(),
          false, DF_CAPACITY, DF_USED, DF_CAPACITY - DF_USED, DF_USED) };
      DatanodeCommand[] cmds = nameNodeProto.sendHeartbeat(dnRegistration,
          rep, 0, 0, 0).getCommands();
      if(cmds != null) {
        for (DatanodeCommand cmd : cmds ) {
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.