Package org.apache.hadoop.thriftfs.jobtracker.api

Examples of org.apache.hadoop.thriftfs.jobtracker.api.ThriftTaskAttemptID$ThriftTaskAttemptIDStandardSchemeFactory


            LOG.info("Unexpected runState in toThrift(TaskStatus.State) - defaulting to FAILED_UNCLEAN" );
            return ThriftTaskState.FAILED_UNCLEAN;
        }

        private static ThriftTaskAttemptID toThrift(TaskAttemptID taskID) {
            ThriftTaskAttemptID ret =  new ThriftTaskAttemptID();
            ret.setTaskID(toThrift(taskID.getTaskID()));
            ret.setAttemptID(taskID.getId());
            ret.setAsString(taskID.toString());
            return ret;
        }
View Full Code Here


            ret.setCounters(new ThriftGroupList(toThrift(t.getCounters())));

            Map<String,ThriftTaskStatus> statusMap = new HashMap<String,ThriftTaskStatus>();
            Map<String,List<String>> dataMap = new HashMap<String,List<String>>();
            for (TaskStatus ts : sts) {
              ThriftTaskAttemptID id = toThrift(ts.getTaskID());
              id.taskID.setTaskType(type);
              statusMap.put(id.getAsString(), toThrift(ts));
              try {
                  // Atomic copy
                  String[] strDiags = tracker.getTaskDiagnostics(ts.getTaskID());
                  // Thrift does not like null values in maps
                  List<String> diag = (strDiags == null ? new ArrayList<String>() :
                                                          Arrays.asList(strDiags));
                  dataMap.put(id.getAsString(), diag);
              } catch (java.io.IOException e) {
                  // tracker.getTaskDiagnostics is supposed to throw,
                  // but I can't see where it does (and removing the throws clause
                  // doesn't cause a compile failure...), so this is probably
                  // extraneous
View Full Code Here

TOP

Related Classes of org.apache.hadoop.thriftfs.jobtracker.api.ThriftTaskAttemptID$ThriftTaskAttemptIDStandardSchemeFactory

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.