Java Code Examples for org.apache.tez.mapreduce.protos.MRRuntimeProtos#MRSplitsProto

The following examples show how to use org.apache.tez.mapreduce.protos.MRRuntimeProtos#MRSplitsProto . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MRInputHelpers.java    From tez with Apache License 2.0 5 votes vote down vote up
/**
 * When isGrouped is true, it specifies that grouping of input splits be
 * performed by Tez The conf should have the input format class configuration
 * set to the TezGroupedSplitsInputFormat. The real input format class name
 * should be passed as an argument to this method.
 * <p/>
 * With grouping enabled, the eventual configuration used by the tasks, will have
 * the user-specified InputFormat replaced by either {@link org.apache.hadoop.mapred.split.TezGroupedSplitsInputFormat}
 * or {@link org.apache.hadoop.mapreduce.split.TezGroupedSplitsInputFormat}
 */
@InterfaceAudience.Private
protected static UserPayload createMRInputPayload(Configuration conf,
    MRRuntimeProtos.MRSplitsProto mrSplitsProto, boolean isGrouped,
    boolean isSorted) throws
        IOException {
  Preconditions
      .checkArgument(conf != null, "Configuration must be specified");

  return createMRInputPayload(TezUtils.createByteStringFromConf(conf),
      mrSplitsProto, isGrouped, isSorted);
}
 
Example 2
Source File: MRInputHelpers.java    From tez with Apache License 2.0 5 votes vote down vote up
private static UserPayload createMRInputPayload(ByteString bytes,
  MRRuntimeProtos.MRSplitsProto mrSplitsProto,
  boolean isGrouped, boolean isSorted) throws IOException {
  MRRuntimeProtos.MRInputUserPayloadProto.Builder userPayloadBuilder =
      MRRuntimeProtos.MRInputUserPayloadProto
          .newBuilder();
  userPayloadBuilder.setConfigurationBytes(bytes);
  if (mrSplitsProto != null) {
    userPayloadBuilder.setSplits(mrSplitsProto);
  }
  userPayloadBuilder.setGroupingEnabled(isGrouped);
  userPayloadBuilder.setSortSplitsEnabled(isSorted);
  return UserPayload.create(userPayloadBuilder.build().
      toByteString().asReadOnlyByteBuffer());
}
 
Example 3
Source File: MRInputHelpers.java    From tez with Apache License 2.0 4 votes vote down vote up
@InterfaceAudience.Private
protected static UserPayload createMRInputPayload(Configuration conf,
                                                  MRRuntimeProtos.MRSplitsProto mrSplitsProto) throws
    IOException {
  return createMRInputPayload(conf, mrSplitsProto, false, true);
}
 
Example 4
Source File: YARNRunner.java    From tez with Apache License 2.0 4 votes vote down vote up
protected static UserPayload createMRInputPayload(Configuration conf,
    MRRuntimeProtos.MRSplitsProto mrSplitsProto) throws
        IOException {
  return MRInputHelpers.createMRInputPayload(conf, mrSplitsProto, false,
      true);
}
 
Example 5
Source File: MRInput.java    From tez with Apache License 2.0 4 votes vote down vote up
protected static UserPayload createMRInputPayload(Configuration conf,
    MRRuntimeProtos.MRSplitsProto mrSplitsProto) throws
    IOException {
  return MRInputHelpers.createMRInputPayload(conf, mrSplitsProto, false,
      true);
}