hive-protolib/src/main/java/com/streamsets/pipeline/stage/processor/hive/HiveMetadataProcessor.java
@VisibleForTesting
  LinkedHashMap<String, String> getPartitionValuesFromRecord(ELVars variables) throws StageException {
    LinkedHashMap<String, String> values = new LinkedHashMap<>();
    for (PartitionConfig pName: partitionConfigList) {
      String ret = HiveMetastoreUtil.resolveEL(elEvals.partitionValueELEval, variables, pName.valueEL);
      if (ret == null || ret.isEmpty()) {
        // If no partition value is found in record, this record goes to Error Record
        throw new HiveStageCheckedException(Errors.HIVE_METADATA_02, pName.valueEL);
      } else if (HiveMetastoreUtil.hasUnsupportedChar(ret)){
        throw new HiveStageCheckedException(Errors.HIVE_METADATA_10, pName.valueEL, ret);
      }
      values.put(pName.name.toLowerCase(), ret);
    }
    return values;
  }
@VisibleForTesting
  LinkedHashMap<String, String> getPartitionValuesFromRecord(ELVars variables) throws StageException {
    LinkedHashMap<String, String> values = new LinkedHashMap<>();
    for (PartitionConfig pName: partitionConfigList) {
      String ret = HiveMetastoreUtil.resolveEL(elEvals.partitionValueELEval, variables, pName.valueEL);
      if (ret == null || ret.isEmpty()) {
        // If no partition value is found in record, this record goes to Error Record
        throw new HiveStageCheckedException(Errors.HIVE_METADATA_02, pName.valueEL);
      } else if (HiveMetastoreUtil.hasUnsupportedChar(ret)){
        throw new HiveStageCheckedException(Errors.HIVE_METADATA_10, pName.valueEL, ret);
      }
      values.put(pName.name.toLowerCase(), ret);
    }
    return values;
  }
@ VisibleForTesting LinkedHashMap < String , String > getPartitionValuesFromRecord ( ELVars variables ) throws StageException { LinkedHashMap < String , String > values = new LinkedHashMap <> ( ) ; for ( PartitionConfig pName : partitionConfigList ) { String ret = HiveMetastoreUtil . resolveEL ( elEvals . partitionValueELEval , variables , pName . valueEL ) ; if ( ret == null || ret . isEmpty ( ) ) { // If no partition value is found in record, this record goes to Error Record throw new HiveStageCheckedException ( Errors . HIVE_METADATA_02 , pName . valueEL ) ; } else if ( HiveMetastoreUtil . hasUnsupportedChar ( ret ) ) { throw new HiveStageCheckedException ( Errors . HIVE_METADATA_10 , pName . valueEL , ret ) ; } values . put ( pName . name . toLowerCase ( ) , ret ) ; } return values ; }
Obtain a list of partition values from record.
@return LinkedHashMap that contains pairs of partition name-values
@throws StageException
Obtain a list of partition values from record .