/** * Returns the acidOperationalProperties for a given set of properties. * @param props A properties object * @return the acidOperationalProperties object for the corresponding properties. */ public static AcidOperationalProperties getAcidOperationalProperties(Properties props) { String resultStr = props.getProperty(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES); if (resultStr == null) { // If the properties does not define any transactional properties, we return a legacy type. return AcidOperationalProperties.getLegacy(); } return AcidOperationalProperties.parseString(resultStr); }
/** * Returns the acidOperationalProperties for a given map. * @param parameters A parameters object * @return the acidOperationalProperties object for the corresponding map. */ public static AcidOperationalProperties getAcidOperationalProperties( Map<String, String> parameters) { String resultStr = parameters.get(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES); if (resultStr == null) { // If the parameters does not define any transactional properties, we return a legacy type. return AcidOperationalProperties.getLegacy(); } return AcidOperationalProperties.parseString(resultStr); } }
/** * Returns the acidOperationalProperties for a given table. * @param table A table object * @return the acidOperationalProperties object for the corresponding table. */ public static AcidOperationalProperties getAcidOperationalProperties(Table table) { String transactionalProperties = table.getProperty( hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES); if (transactionalProperties == null) { // If the table does not define any transactional properties, we return a legacy type. return AcidOperationalProperties.getLegacy(); } return AcidOperationalProperties.parseString(transactionalProperties); }