odps-sdk-impl/odps-mapred-local/src/main/java/com/aliyun/odps/mapred/local/utils/LocalValidatorFactory.java [343:371]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void validate() throws OdpsException {
      if (pipeline == null) {
        throwException(ErrorCode.ILLEGAL_CONFIG, "Pipeline not specified.");
      }
      if (pipeline.getNodeNum() == 0) {
        throwException(ErrorCode.ILLEGAL_CONFIG, "Pipeline is empty.");
      }
      if (pipeline.getFirstNode().getType().equals("reduce")) {
        throwException(ErrorCode.ILLEGAL_CONFIG, "First operator of pipeline must be mapper");
      }
      for (int i = 0; i < pipeline.getNodeNum(); i++) {
        if (i > 0 && pipeline.getNode(i).getType().equals("map")) {
          throwException(ErrorCode.ILLEGAL_CONFIG, "Operators after first node must be reducer");
        }
        if (i < pipeline.getNodeNum() - 1) {
          if (pipeline.getNode(i).getOutputKeySchema() == null) {
            throwException(ErrorCode.ILLEGAL_CONFIG, "Operator ouput key schema not set");
          }
          if (pipeline.getNode(i).getOutputValueSchema() == null) {
            throwException(ErrorCode.ILLEGAL_CONFIG, "Operator ouput value schema not set");
          }
        }
      }
      StringBuilder errorMsg = new StringBuilder();
      if (!validatePartitionColumns(pipeline, errorMsg)) {
        throwException(ErrorCode.ILLEGAL_CONFIG,
            "Key partition columns should be inside of output key columns. " + errorMsg);
      }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



odps-sdk-impl/odps-mapred-bridge/src/main/java/com/aliyun/odps/mapred/bridge/utils/ValidatorFactory.java [421:449]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void validate() throws OdpsException {
      if (pipeline == null) {
        throwException(ErrorCode.ILLEGAL_CONFIG, "Pipeline not specified.");
      }
      if (pipeline.getNodeNum() == 0) {
        throwException(ErrorCode.ILLEGAL_CONFIG, "Pipeline is empty.");
      }
      if (pipeline.getFirstNode().getType().equals("reduce")) {
        throwException(ErrorCode.ILLEGAL_CONFIG, "First operator of pipeline must be mapper");
      }
      for (int i = 0; i < pipeline.getNodeNum(); i++) {
        if (i > 0 && pipeline.getNode(i).getType().equals("map")) {
          throwException(ErrorCode.ILLEGAL_CONFIG, "Operators after first node must be reducer");
        }
        if (i < pipeline.getNodeNum() - 1) {
          if (pipeline.getNode(i).getOutputKeySchema() == null) {
            throwException(ErrorCode.ILLEGAL_CONFIG, "Operator ouput key schema not set");
          }
          if (pipeline.getNode(i).getOutputValueSchema() == null) {
            throwException(ErrorCode.ILLEGAL_CONFIG, "Operator ouput value schema not set");
          }
        }
      }
      StringBuilder errorMsg = new StringBuilder();
      if (!validatePartitionColumns(pipeline, errorMsg)) {
        throwException(ErrorCode.ILLEGAL_CONFIG,
            "Key partition columns should be inside of output key columns. " + errorMsg);
      }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



