@Override public HCatPartitionSpec deserializePartitionSpec(List<String> hcatPartitionSpecStrings) throws HCatException { try { List<PartitionSpec> partitionSpecList = new ArrayList<PartitionSpec>(); TDeserializer deserializer = new TDeserializer(new TJSONProtocol.Factory()); for (String stringRep : hcatPartitionSpecStrings) { PartitionSpec partSpec = new PartitionSpec(); deserializer.deserialize(partSpec, stringRep, "UTF-8"); partitionSpecList.add(partSpec); } return new HCatPartitionSpec(null, PartitionSpecProxy.Factory.get(partitionSpecList)); } catch (TException deserializationException) { throw new HCatException("Failed to deserialize!", deserializationException); } } }
@Override @InterfaceAudience.LimitedPrivate({"Hive"}) @InterfaceStability.Evolving public HCatPartitionSpec getPartitionSpecs(String dbName, String tableName, int maxPartitions) throws HCatException { try { return new HCatPartitionSpec(getTable(dbName, tableName), hmsClient.listPartitionSpecs(dbName, tableName, maxPartitions)); } catch (NoSuchObjectException e) { throw new ObjectNotFoundException( "NoSuchObjectException while retrieving partition.", e); } catch (MetaException e) { throw new HCatException( "MetaException while retrieving partition.", e); } catch (TException e) { throw new ConnectionFailureException( "TException while retrieving partition.", e); } }
@Override @InterfaceAudience.LimitedPrivate({"Hive"}) @InterfaceStability.Evolving public HCatPartitionSpec listPartitionSpecsByFilter(String dbName, String tblName, String filter, int maxPartitions) throws HCatException { try { return new HCatPartitionSpec(getTable(dbName, tblName), hmsClient.listPartitionSpecsByFilter(dbName, tblName, filter, maxPartitions)); } catch(MetaException e) { throw new HCatException("MetaException while fetching partitions.", e); } catch (NoSuchObjectException e) { throw new ObjectNotFoundException( "NoSuchObjectException while fetching partitions.", e); } catch (TException e) { throw new ConnectionFailureException( "TException while fetching partitions.", e); } }
@Override public HCatPartitionSpec deserializePartitionSpec(List<String> hcatPartitionSpecStrings) throws HCatException { try { List<PartitionSpec> partitionSpecList = new ArrayList<PartitionSpec>(); TDeserializer deserializer = new TDeserializer(new TJSONProtocol.Factory()); for (String stringRep : hcatPartitionSpecStrings) { PartitionSpec partSpec = new PartitionSpec(); deserializer.deserialize(partSpec, stringRep, "UTF-8"); partitionSpecList.add(partSpec); } return new HCatPartitionSpec(null, PartitionSpecProxy.Factory.get(partitionSpecList)); } catch (TException deserializationException) { throw new HCatException("Failed to deserialize!", deserializationException); } } }
@Override public HCatPartitionSpec deserializePartitionSpec(List<String> hcatPartitionSpecStrings) throws HCatException { try { List<PartitionSpec> partitionSpecList = new ArrayList<PartitionSpec>(); TDeserializer deserializer = new TDeserializer(new TJSONProtocol.Factory()); for (String stringRep : hcatPartitionSpecStrings) { PartitionSpec partSpec = new PartitionSpec(); deserializer.deserialize(partSpec, stringRep, "UTF-8"); partitionSpecList.add(partSpec); } return new HCatPartitionSpec(null, PartitionSpecProxy.Factory.get(partitionSpecList)); } catch (TException deserializationException) { throw new HCatException("Failed to deserialize!", deserializationException); } } }
@Override public HCatPartitionSpec deserializePartitionSpec(List<String> hcatPartitionSpecStrings) throws HCatException { try { List<PartitionSpec> partitionSpecList = new ArrayList<PartitionSpec>(); TDeserializer deserializer = new TDeserializer(new TJSONProtocol.Factory()); for (String stringRep : hcatPartitionSpecStrings) { PartitionSpec partSpec = new PartitionSpec(); deserializer.deserialize(partSpec, stringRep, "UTF-8"); partitionSpecList.add(partSpec); } return new HCatPartitionSpec(null, PartitionSpecProxy.Factory.get(partitionSpecList)); } catch (TException deserializationException) { throw new HCatException("Failed to deserialize!", deserializationException); } } }
@Override @InterfaceAudience.LimitedPrivate({"Hive"}) @InterfaceStability.Evolving public HCatPartitionSpec getPartitionSpecs(String dbName, String tableName, int maxPartitions) throws HCatException { try { return new HCatPartitionSpec(getTable(dbName, tableName), hmsClient.listPartitionSpecs(dbName, tableName, maxPartitions)); } catch (NoSuchObjectException e) { throw new ObjectNotFoundException( "NoSuchObjectException while retrieving partition.", e); } catch (MetaException e) { throw new HCatException( "MetaException while retrieving partition.", e); } catch (TException e) { throw new ConnectionFailureException( "TException while retrieving partition.", e); } }
@Override @InterfaceAudience.LimitedPrivate({"Hive"}) @InterfaceStability.Evolving public HCatPartitionSpec listPartitionSpecsByFilter(String dbName, String tblName, String filter, int maxPartitions) throws HCatException { try { return new HCatPartitionSpec(getTable(dbName, tblName), hmsClient.listPartitionSpecsByFilter(dbName, tblName, filter, maxPartitions)); } catch(MetaException e) { throw new HCatException("MetaException while fetching partitions.", e); } catch (NoSuchObjectException e) { throw new ObjectNotFoundException( "NoSuchObjectException while fetching partitions.", e); } catch (TException e) { throw new ConnectionFailureException( "TException while fetching partitions.", e); } }
@Override @InterfaceAudience.LimitedPrivate({"Hive"}) @InterfaceStability.Evolving public HCatPartitionSpec getPartitionSpecs(String dbName, String tableName, int maxPartitions) throws HCatException { try { return new HCatPartitionSpec(getTable(dbName, tableName), hmsClient.listPartitionSpecs(dbName, tableName, maxPartitions)); } catch (NoSuchObjectException e) { throw new ObjectNotFoundException( "NoSuchObjectException while retrieving partition.", e); } catch (MetaException e) { throw new HCatException( "MetaException while retrieving partition.", e); } catch (TException e) { throw new ConnectionFailureException( "TException while retrieving partition.", e); } }
@Override @InterfaceAudience.LimitedPrivate({"Hive"}) @InterfaceStability.Evolving public HCatPartitionSpec getPartitionSpecs(String dbName, String tableName, int maxPartitions) throws HCatException { try { return new HCatPartitionSpec(getTable(dbName, tableName), hmsClient.listPartitionSpecs(dbName, tableName, maxPartitions)); } catch (NoSuchObjectException e) { throw new ObjectNotFoundException( "NoSuchObjectException while retrieving partition.", e); } catch (MetaException e) { throw new HCatException( "MetaException while retrieving partition.", e); } catch (TException e) { throw new ConnectionFailureException( "TException while retrieving partition.", e); } }
@Override @InterfaceAudience.LimitedPrivate({"Hive"}) @InterfaceStability.Evolving public HCatPartitionSpec listPartitionSpecsByFilter(String dbName, String tblName, String filter, int maxPartitions) throws HCatException { try { return new HCatPartitionSpec(getTable(dbName, tblName), hmsClient.listPartitionSpecsByFilter(dbName, tblName, filter, maxPartitions)); } catch(MetaException e) { throw new HCatException("MetaException while fetching partitions.", e); } catch (NoSuchObjectException e) { throw new ObjectNotFoundException( "NoSuchObjectException while fetching partitions.", e); } catch (TException e) { throw new ConnectionFailureException( "TException while fetching partitions.", e); } }
@Override @InterfaceAudience.LimitedPrivate({"Hive"}) @InterfaceStability.Evolving public HCatPartitionSpec listPartitionSpecsByFilter(String dbName, String tblName, String filter, int maxPartitions) throws HCatException { try { return new HCatPartitionSpec(getTable(dbName, tblName), hmsClient.listPartitionSpecsByFilter(dbName, tblName, filter, maxPartitions)); } catch(MetaException e) { throw new HCatException("MetaException while fetching partitions.", e); } catch (NoSuchObjectException e) { throw new ObjectNotFoundException( "NoSuchObjectException while fetching partitions.", e); } catch (TException e) { throw new ConnectionFailureException( "TException while fetching partitions.", e); } }