Package org.apache.hadoop.yarn.server.resourcemanager.recovery.records.impl.pb

Examples of org.apache.hadoop.yarn.server.resourcemanager.recovery.records.impl.pb.ApplicationAttemptStateDataPBImpl


        String attemptPath = getNodePath(appPath, attemptIDStr);
        byte[] attemptData = getDataWithRetries(attemptPath, true);

        ApplicationAttemptId attemptId =
            ConverterUtils.toApplicationAttemptId(attemptIDStr);
        ApplicationAttemptStateDataPBImpl attemptStateData =
            new ApplicationAttemptStateDataPBImpl(
                ApplicationAttemptStateDataProto.parseFrom(attemptData));
        Credentials credentials = null;
        if (attemptStateData.getAppAttemptTokens() != null) {
          credentials = new Credentials();
          DataInputByteBuffer dibb = new DataInputByteBuffer();
          dibb.reset(attemptStateData.getAppAttemptTokens());
          credentials.readTokenStorageStream(dibb);
        }

        ApplicationAttemptState attemptState =
            new ApplicationAttemptState(attemptId,
              attemptStateData.getMasterContainer(), credentials,
              attemptStateData.getStartTime(), attemptStateData.getState(),
              attemptStateData.getFinalTrackingUrl(),
              attemptStateData.getDiagnostics(),
              attemptStateData.getFinalApplicationStatus(),
              attemptStateData.getAMContainerExitStatus());

        appState.attempts.put(attemptState.getAttemptId(), attemptState);
      }
    }
    LOG.debug("Done Loading applications from ZK state store");
View Full Code Here


              LOG.debug("Loading application attempt from node: "
                  + childNodeName);
            }
            ApplicationAttemptId attemptId =
                ConverterUtils.toApplicationAttemptId(childNodeName);
            ApplicationAttemptStateDataPBImpl attemptStateData =
                new ApplicationAttemptStateDataPBImpl(
                  ApplicationAttemptStateDataProto.parseFrom(childData));
            Credentials credentials = null;
            if (attemptStateData.getAppAttemptTokens() != null) {
              credentials = new Credentials();
              DataInputByteBuffer dibb = new DataInputByteBuffer();
              dibb.reset(attemptStateData.getAppAttemptTokens());
              credentials.readTokenStorageStream(dibb);
            }
            ApplicationAttemptState attemptState =
                new ApplicationAttemptState(attemptId,
                  attemptStateData.getMasterContainer(), credentials,
                  attemptStateData.getStartTime(),
                  attemptStateData.getState(),
                  attemptStateData.getFinalTrackingUrl(),
                  attemptStateData.getDiagnostics(),
                  attemptStateData.getFinalApplicationStatus(),
                  attemptStateData.getAMContainerExitStatus());

            // assert child node name is same as application attempt id
            assert attemptId.equals(attemptState.getAttemptId());
            attempts.add(attemptState);
          } else {
View Full Code Here

            .startsWith(ApplicationAttemptId.appAttemptIdStrPrefix)) {
            // attempt
            LOG.info("Loading application attempt from node: " + childNodeName);
            ApplicationAttemptId attemptId =
                ConverterUtils.toApplicationAttemptId(childNodeName);
            ApplicationAttemptStateDataPBImpl attemptStateData =
                new ApplicationAttemptStateDataPBImpl(
                  ApplicationAttemptStateDataProto.parseFrom(childData));
            Credentials credentials = null;
            if (attemptStateData.getAppAttemptTokens() != null) {
              credentials = new Credentials();
              DataInputByteBuffer dibb = new DataInputByteBuffer();
              dibb.reset(attemptStateData.getAppAttemptTokens());
              credentials.readTokenStorageStream(dibb);
            }
            ApplicationAttemptState attemptState =
                new ApplicationAttemptState(attemptId,
                  attemptStateData.getMasterContainer(), credentials);

            // assert child node name is same as application attempt id
            assert attemptId.equals(attemptState.getAttemptId());
            attempts.add(attemptState);
          } else {
View Full Code Here

              DataOutputBuffer dob = new DataOutputBuffer();
                credentials.writeTokenStorageToStream(dob);
              appAttemptTokens =
                  ByteBuffer.wrap(dob.getData(), 0, dob.getLength());
            }
            ApplicationAttemptStateDataPBImpl attemptStateData =
              (ApplicationAttemptStateDataPBImpl) ApplicationAttemptStateDataPBImpl
                  .newApplicationAttemptStateData(attemptState.getAttemptId(),
                    attemptState.getMasterContainer(), appAttemptTokens);

            LOG.info("Storing info for attempt: " + attemptState.getAttemptId());
View Full Code Here

              DataOutputBuffer dob = new DataOutputBuffer();
                credentials.writeTokenStorageToStream(dob);
              appAttemptTokens =
                  ByteBuffer.wrap(dob.getData(), 0, dob.getLength());
            }
            ApplicationAttemptStateDataPBImpl attemptStateData =
              (ApplicationAttemptStateDataPBImpl) ApplicationAttemptStateDataPBImpl
                  .newApplicationAttemptStateData(attemptState.getAttemptId(),
                    attemptState.getMasterContainer(), appAttemptTokens);

            LOG.info("Storing info for attempt: " + attemptState.getAttemptId());
View Full Code Here

            .startsWith(ApplicationAttemptId.appAttemptIdStrPrefix)) {
            // attempt
            LOG.info("Loading application attempt from node: " + childNodeName);
            ApplicationAttemptId attemptId =
                ConverterUtils.toApplicationAttemptId(childNodeName);
            ApplicationAttemptStateDataPBImpl attemptStateData =
                new ApplicationAttemptStateDataPBImpl(
                  ApplicationAttemptStateDataProto.parseFrom(childData));
            Credentials credentials = null;
            if (attemptStateData.getAppAttemptTokens() != null) {
              credentials = new Credentials();
              DataInputByteBuffer dibb = new DataInputByteBuffer();
              dibb.reset(attemptStateData.getAppAttemptTokens());
              credentials.readTokenStorageStream(dibb);
            }
            ApplicationAttemptState attemptState =
                new ApplicationAttemptState(attemptId,
                  attemptStateData.getMasterContainer(), credentials);

            // assert child node name is same as application attempt id
            assert attemptId.equals(attemptState.getAttemptId());
            attempts.add(attemptState);
          } else {
View Full Code Here

        String attemptPath = getNodePath(appPath, attemptIDStr);
        byte[] attemptData = getDataWithRetries(attemptPath, true);

        ApplicationAttemptId attemptId =
            ConverterUtils.toApplicationAttemptId(attemptIDStr);
        ApplicationAttemptStateDataPBImpl attemptStateData =
            new ApplicationAttemptStateDataPBImpl(
                ApplicationAttemptStateDataProto.parseFrom(attemptData));
        Credentials credentials = null;
        if (attemptStateData.getAppAttemptTokens() != null) {
          credentials = new Credentials();
          DataInputByteBuffer dibb = new DataInputByteBuffer();
          dibb.reset(attemptStateData.getAppAttemptTokens());
          credentials.readTokenStorageStream(dibb);
        }

        ApplicationAttemptState attemptState =
            new ApplicationAttemptState(attemptId,
                attemptStateData.getMasterContainer(), credentials,
                attemptStateData.getStartTime(),
                attemptStateData.getState(),
                attemptStateData.getFinalTrackingUrl(),
                attemptStateData.getDiagnostics(),
                attemptStateData.getFinalApplicationStatus());

        appState.attempts.put(attemptState.getAttemptId(), attemptState);
      }
    }
    LOG.info("Done Loading applications from ZK state store");
View Full Code Here

              LOG.debug("Loading application attempt from node: "
                  + childNodeName);
            }
            ApplicationAttemptId attemptId =
                ConverterUtils.toApplicationAttemptId(childNodeName);
            ApplicationAttemptStateDataPBImpl attemptStateData =
                new ApplicationAttemptStateDataPBImpl(
                  ApplicationAttemptStateDataProto.parseFrom(childData));
            Credentials credentials = null;
            if (attemptStateData.getAppAttemptTokens() != null) {
              credentials = new Credentials();
              DataInputByteBuffer dibb = new DataInputByteBuffer();
              dibb.reset(attemptStateData.getAppAttemptTokens());
              credentials.readTokenStorageStream(dibb);
            }
            ApplicationAttemptState attemptState =
                new ApplicationAttemptState(attemptId,
                  attemptStateData.getMasterContainer(), credentials,
                  attemptStateData.getStartTime(),
                  attemptStateData.getState(),
                  attemptStateData.getFinalTrackingUrl(),
                  attemptStateData.getDiagnostics(),
                  attemptStateData.getFinalApplicationStatus());

            // assert child node name is same as application attempt id
            assert attemptId.equals(attemptState.getAttemptId());
            attempts.add(attemptState);
          } else {
View Full Code Here

        if (credentials != null) {
          DataOutputBuffer dob = new DataOutputBuffer();
          credentials.writeTokenStorageToStream(dob);
          appAttemptTokens = ByteBuffer.wrap(dob.getData(), 0, dob.getLength());
        }
        ApplicationAttemptStateDataPBImpl attemptStateData =
            (ApplicationAttemptStateDataPBImpl) ApplicationAttemptStateDataPBImpl
              .newApplicationAttemptStateData(attemptState.getAttemptId(),
                attemptState.getMasterContainer(), appAttemptTokens,
                attemptState.getStartTime(), attemptState.getState(),
                attemptState.getFinalTrackingUrl(),
View Full Code Here

              LOG.debug("Loading application attempt from node: "
                  + childNodeName);
            }
            ApplicationAttemptId attemptId =
                ConverterUtils.toApplicationAttemptId(childNodeName);
            ApplicationAttemptStateDataPBImpl attemptStateData =
                new ApplicationAttemptStateDataPBImpl(
                  ApplicationAttemptStateDataProto.parseFrom(childData));
            Credentials credentials = null;
            if (attemptStateData.getAppAttemptTokens() != null) {
              credentials = new Credentials();
              DataInputByteBuffer dibb = new DataInputByteBuffer();
              dibb.reset(attemptStateData.getAppAttemptTokens());
              credentials.readTokenStorageStream(dibb);
            }
            ApplicationAttemptState attemptState =
                new ApplicationAttemptState(attemptId,
                  attemptStateData.getMasterContainer(), credentials,
                  attemptStateData.getStartTime(),
                  attemptStateData.getState(),
                  attemptStateData.getFinalTrackingUrl(),
                  attemptStateData.getDiagnostics(),
                  attemptStateData.getFinalApplicationStatus());

            // assert child node name is same as application attempt id
            assert attemptId.equals(attemptState.getAttemptId());
            attempts.add(attemptState);
          } else {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.server.resourcemanager.recovery.records.impl.pb.ApplicationAttemptStateDataPBImpl

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.