HiveRegistrationUnit(Builder<?> builder) { Preconditions.checkArgument(!Strings.isNullOrEmpty(builder.dbName)); Preconditions.checkArgument(!Strings.isNullOrEmpty(builder.tableName)); this.dbName = builder.dbName; this.tableName = builder.tableName; this.columns.addAll(builder.columns); this.props.addAll(builder.props); this.storageProps.addAll(builder.storageProps); this.serDeProps.addAll(builder.serDeProps); this.serDeManager = builder.serDeManager; populateTablePartitionFields(this.props); populateStorageFields(this.storageProps); populateSerDeFields(this.serDeProps); }
@SuppressWarnings("serial") @Override protected void populateTablePartitionFields(State state) { super.populateTablePartitionFields(state); this.owner = populateField(state, HiveConstants.OWNER, new TypeToken<String>() {}); this.tableType = populateField(state, HiveConstants.TABLE_TYPE, new TypeToken<String>() {}); this.retention = populateField(state, HiveConstants.RETENTION, new TypeToken<Long>() {}); }
HiveRegistrationUnit(Builder<?> builder) { Preconditions.checkArgument(!Strings.isNullOrEmpty(builder.dbName)); Preconditions.checkArgument(!Strings.isNullOrEmpty(builder.tableName)); this.dbName = builder.dbName; this.tableName = builder.tableName; this.columns.addAll(builder.columns); this.props.addAll(builder.props); this.storageProps.addAll(builder.storageProps); this.serDeProps.addAll(builder.serDeProps); this.serDeManager = builder.serDeManager; populateTablePartitionFields(this.props); populateStorageFields(this.storageProps); populateSerDeFields(this.serDeProps); }
@SuppressWarnings("serial") @Override protected void populateTablePartitionFields(State state) { super.populateTablePartitionFields(state); this.owner = populateField(state, HiveConstants.OWNER, new TypeToken<String>() {}); this.tableType = populateField(state, HiveConstants.TABLE_TYPE, new TypeToken<String>() {}); this.retention = populateField(state, HiveConstants.RETENTION, new TypeToken<Long>() {}); }