Examples of ApplicationAttemptStateDataPBImpl


Examples of org.apache.hadoop.yarn.api.records.impl.pb.ApplicationAttemptStateDataPBImpl

      case STORE_APP_ATTEMPT:
        {
          ApplicationAttemptState attemptState =
                    ((RMStateStoreAppAttemptEvent) event).getAppAttemptState();
          Exception storedException = null;
          ApplicationAttemptStateDataPBImpl attemptStateData =
                                        new ApplicationAttemptStateDataPBImpl();
          attemptStateData.setAttemptId(attemptState.getAttemptId());
          attemptStateData.setMasterContainer(attemptState.getMasterContainer());

          LOG.info("Storing info for attempt: " + attemptState.getAttemptId());
          try {
            storeApplicationAttemptState(attemptState.getAttemptId().toString(),
                                         attemptStateData);
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.impl.pb.ApplicationAttemptStateDataPBImpl

                                ApplicationAttemptId.appAttemptIdStrPrefix)) {
          // attempt
          LOG.info("Loading application attempt from node: " + childNodeName);
          ApplicationAttemptId attemptId =
                          ConverterUtils.toApplicationAttemptId(childNodeName);
          ApplicationAttemptStateDataPBImpl attemptStateData =
              new ApplicationAttemptStateDataPBImpl(
                  ApplicationAttemptStateDataProto.parseFrom(childData));
          ApplicationAttemptState attemptState = new ApplicationAttemptState(
                          attemptId, attemptStateData.getMasterContainer());
          // assert child node name is same as application attempt id
          assert attemptId.equals(attemptState.getAttemptId());
          attempts.add(attemptState);
        } else {
          LOG.info("Unknown child node with name: " + childNodeName);
View Full Code Here

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

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

              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

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

            .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

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

              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

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

              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

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

            .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

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());

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

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

              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
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.