hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveMetastoreUtil.java
public static boolean getCustomLocation(Record metadataRecord) throws HiveStageCheckedException{
    if (metadataRecord.get(SEP + VERSION).getValueAsInteger() < 3) {
      return DEFAULT_CUSTOM_LOCATION;
    }

    if (metadataRecord.has(SEP + CUSTOM_LOCATION)) {
      return metadataRecord.get(SEP + CUSTOM_LOCATION).getValueAsBoolean();
    }
    throw new HiveStageCheckedException(Errors.HIVE_17, CUSTOM_LOCATION, metadataRecord);
  }
public static boolean getCustomLocation(Record metadataRecord) throws HiveStageCheckedException{
    if (metadataRecord.get(SEP + VERSION).getValueAsInteger() < 3) {
      return DEFAULT_CUSTOM_LOCATION;
    }

    if (metadataRecord.has(SEP + CUSTOM_LOCATION)) {
      return metadataRecord.get(SEP + CUSTOM_LOCATION).getValueAsBoolean();
    }
    throw new HiveStageCheckedException(Errors.HIVE_17, CUSTOM_LOCATION, metadataRecord);
  }
Get the customLocation flag from the metadata record. This flag marks whether or not the Hive database object
is stored into a custom path on the Hadoop filesystem. In both cases, the path is stored in the 'location'
field of the metadata record.

The customLocation flag is included in partition metadata records with version > 2. For previous versions this
function returns {@code DEFAULT_CUSTOM_LOCATION} to keep the previous behavior.

@param metadataRecord the metadata record.
@return true if the location has been customized, false otherwise.
@throws HiveStageCheckedException