final Map<String, String> serdeParams = notNull(storageInfo.getSerdeInfoParameters()) ? storageInfo.getSerdeInfoParameters() : new HashMap<>(); final String serializationLib = storageInfo.getSerializationLib(); return new StorageDescriptor( cols,
final Map<String, String> serdeParams = notNull(storageInfo.getSerdeInfoParameters()) ? storageInfo.getSerdeInfoParameters() : new HashMap<>(); final String serializationLib = storageInfo.getSerializationLib(); return new StorageDescriptor( cols,
new Object[]{currentTimeInEpoch, partId, PARAM_LAST_DDL_TIME, currentTimeInEpoch}); if (storageInfo != null) { serdesValues.add(new Object[]{null, storageInfo.getSerializationLib(), serdeId}); final Map<String, String> serdeInfoParameters = storageInfo.getSerdeInfoParameters(); if (serdeInfoParameters != null) {
new Object[]{currentTimeInEpoch, partId, PARAM_LAST_DDL_TIME, currentTimeInEpoch}); if (storageInfo != null) { serdesValues.add(new Object[]{null, storageInfo.getSerializationLib(), serdeId}); final Map<String, String> serdeInfoParameters = storageInfo.getSerdeInfoParameters(); if (serdeInfoParameters != null) {
serdesValues.add(new Object[]{null, storageInfo.getSerializationLib(), serdeId}); final Map<String, String> serdeInfoParameters = storageInfo.getSerdeInfoParameters(); if (serdeInfoParameters != null) {
serdesValues.add(new Object[]{null, storageInfo.getSerializationLib(), serdeId}); final Map<String, String> serdeInfoParameters = storageInfo.getSerdeInfoParameters(); if (serdeInfoParameters != null) {
private void copyTableSdToPartitionInfoSd(final PartitionInfo partitionInfo, final Table table) { StorageInfo sd = partitionInfo.getSerde(); // // Partitions can be provided in the request without the storage information. // if (sd == null) { sd = new StorageInfo(); partitionInfo.setSerde(sd); } final StorageDescriptor tableSd = table.getSd(); if (StringUtils.isBlank(sd.getInputFormat())) { sd.setInputFormat(tableSd.getInputFormat()); } if (StringUtils.isBlank(sd.getOutputFormat())) { sd.setOutputFormat(tableSd.getOutputFormat()); } if (sd.getParameters() == null || sd.getParameters().isEmpty()) { sd.setParameters(tableSd.getParameters()); } final SerDeInfo tableSerde = tableSd.getSerdeInfo(); if (tableSerde != null) { if (StringUtils.isBlank(sd.getSerializationLib())) { sd.setSerializationLib(tableSerde.getSerializationLib()); } if (sd.getSerdeInfoParameters() == null || sd.getSerdeInfoParameters().isEmpty()) { sd.setSerdeInfoParameters(tableSerde.getParameters()); } } }
private void copyTableSdToPartitionInfoSd(final PartitionInfo partitionInfo, final Table table) { StorageInfo sd = partitionInfo.getSerde(); // // Partitions can be provided in the request without the storage information. // if (sd == null) { sd = new StorageInfo(); partitionInfo.setSerde(sd); } final StorageDescriptor tableSd = table.getSd(); if (StringUtils.isBlank(sd.getInputFormat())) { sd.setInputFormat(tableSd.getInputFormat()); } if (StringUtils.isBlank(sd.getOutputFormat())) { sd.setOutputFormat(tableSd.getOutputFormat()); } if (sd.getParameters() == null || sd.getParameters().isEmpty()) { sd.setParameters(tableSd.getParameters()); } final SerDeInfo tableSerde = tableSd.getSerdeInfo(); if (tableSerde != null) { if (StringUtils.isBlank(sd.getSerializationLib())) { sd.setSerializationLib(tableSerde.getSerializationLib()); } if (sd.getSerdeInfoParameters() == null || sd.getSerdeInfoParameters().isEmpty()) { sd.setSerdeInfoParameters(tableSerde.getParameters()); } } }
&& Strings.isNullOrEmpty(sd.getSerdeInfo().getSerializationLib()) ) { sd.getSerdeInfo().setSerializationLib(tableInfo.getSerde().getSerializationLib());
/** * Converts from storage info to s3 location. * @param storageInfo storage info * @return location */ Location fromStorageInfo(final StorageInfo storageInfo) { final Location result = new Location(); if (storageInfo != null) { result.setUri(storageInfo.getUri()); final Info info = new Info(); info.setLocation(result); info.setOwner(storageInfo.getOwner()); info.setInputFormat(storageInfo.getInputFormat()); info.setOutputFormat(storageInfo.getOutputFormat()); info.setSerializationLib(storageInfo.getSerializationLib()); final Map<String, String> parameters = Maps.newHashMap(); if (storageInfo.getParameters() != null) { parameters.putAll(storageInfo.getParameters()); } if (storageInfo.getSerdeInfoParameters() != null) { parameters.putAll(storageInfo.getSerdeInfoParameters()); } info.setParameters(parameters); result.setInfo(info); } return result; }
&& Strings.isNullOrEmpty(sd.getSerdeInfo().getSerializationLib()) ) { sd.getSerdeInfo().setSerializationLib(tableInfo.getSerde().getSerializationLib());
final StorageInfo storageInfo = tableInfo.getSerde(); if (storageInfo != null) { if (!Strings.isNullOrEmpty(storageInfo.getSerializationLib())) { serdeInfo.setSerializationLib(storageInfo.getSerializationLib());
final StorageInfo storageInfo = tableInfo.getSerde(); if (storageInfo != null) { if (!Strings.isNullOrEmpty(storageInfo.getSerializationLib())) { serdeInfo.setSerializationLib(storageInfo.getSerializationLib());