Skip to content

Commit

Permalink
Minor javadoc cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoymajumdar committed Mar 28, 2016
1 parent 26fb26a commit 19d385a
Show file tree
Hide file tree
Showing 16 changed files with 141 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ public void apply(RequestTemplate template) {

/**
* Returns an API instance that conforms to the given API Type that can communicate with the Metacat server
*
* @param apiType A JAX-RS annotated Metacat interface
* @param apiType apiType A JAX-RS annotated Metacat interface
* @param <T> API Resource instance
* @return An instance that implements the given interface and is wired up to communicate with the Metacat server.
*/
public <T> T getApiClient(@Nonnull Class<T> apiType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ public interface LookupService {
* Saves the lookup value
* @param name lookup name
* @param values multiple values
* @return
* @return updated lookup
*/
Lookup setValues(String name, Set<String> values);
/**
* Saves the lookup value
* @param name lookup name
* @param values multiple values
* @return
* @return updated lookup
*/
Lookup addValues(String name, Set<String> values);
/**
* Saves the lookup value
* @param name lookup name
* @param value lookup value
* @return
* @return updated lookup
*/
Lookup setValue(String name, String value);
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ List<QualifiedName> search(
* Tags the given table with the given <code>tags</code>
* @param qualifiedName, table name
* @param tags list of tags
* @param updateUserMetadata if true, updates the tags in the user metadata
* @return return the complete list of tags associated with the table
*/
Set<String> setTableTags(
Expand All @@ -75,6 +76,7 @@ Set<String> setTableTags(
* @param qualifiedName table name
* @param deleteAll if true, will delete all tags associated with the given table
* @param tags list of tags to be removed for the given table
* @param updateUserMetadata if true, updates the tags in the user metadata
*/
Void removeTableTags(
QualifiedName qualifiedName,
Expand All @@ -85,6 +87,7 @@ Void removeTableTags(
/**
* Delete the tag item along with its associated tags.
* @param name table name
* @param updateUserMetadata if true, updates the tags in the user metadata
* @return null
*/
Void delete(QualifiedName name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public interface MetacatJson {
* JSON. Same converters (serializers, deserializers) will be used as for
* data binding, meaning same object mapper configuration works.
*
* @param fromValue object to be converted
* @param toValueType POJO class to be converted to
* @param <T> POJO class
* @return Returns the converted POJO
* @throws MetacatJsonException If conversion fails due to incompatible type;
* if so, root cause will contain underlying checked exception data binding
* functionality threw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,28 @@ public interface MetacatHiveMetastore extends HiveMetastore {
/**
* Create schema/database
* @param database database metadata
* @throws AlreadyExistsException if database with the same name exists
*/
void createDatabase(Database database) throws AlreadyExistsException;

/**
* Update schema/database
* @param database database metadata
* @throws NoSuchObjectException if the database does not exist
*/
void updateDatabase(Database database) throws NoSuchObjectException;

/**
* Drop database
* @param dbName database name
* @throws NoSuchObjectException if the database does not exist
*/
void dropDatabase(String dbName) throws NoSuchObjectException;

/**
* Alter the given table
* @param table the table name
* @throws NoSuchObjectException if the table does not exist
*/
void alterTable(final Table table) throws NoSuchObjectException;

Expand All @@ -64,6 +68,7 @@ public interface MetacatHiveMetastore extends HiveMetastore {
* @param tableName table name
* @param filter filter expression (JSP comparable expression)
* @return list of partitions
* @throws NoSuchObjectException if the table does not exist
*/
List<Partition> getPartitions(String dbName, String tableName, String filter) throws NoSuchObjectException;

Expand All @@ -73,18 +78,26 @@ public interface MetacatHiveMetastore extends HiveMetastore {
* @param tableName table name
* @param partitionIds partition ids/names
* @return list of partitions
* @throws NoSuchObjectException if the table does not exist
*/
List<Partition> getPartitions(String dbName, String tableName, List<String> partitionIds) throws NoSuchObjectException;

/**
* Saves the partitions.
* @param partitions list of partitions
* @throws NoSuchObjectException if the table does not exist
* @throws AlreadyExistsException if the partition already exist
*/
void savePartitions(List<Partition> partitions) throws NoSuchObjectException, AlreadyExistsException;

/**
* Saves the partitions. Deletes the partitions with the given <code>delPartitionNames</code>
* @param dbName database name
* @param tableName table name
* @param partitions list of partitions
* @param delPartitionNames list of names of the partitions to be deleted
* @throws NoSuchObjectException if the table does not exist
* @throws AlreadyExistsException if the partition already exist
*/
void addDropPartitions(String dbName, String tableName, List<Partition> partitions, List<String> delPartitionNames) throws NoSuchObjectException, AlreadyExistsException;

Expand All @@ -93,6 +106,7 @@ public interface MetacatHiveMetastore extends HiveMetastore {
* @param dbName database name
* @param tableName table name
* @param partitionNames partition ids/names
* @throws NoSuchObjectException if the partition does not exist
*/
void dropPartitions( String dbName, String tableName, List<String> partitionNames) throws NoSuchObjectException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ private ConnectorIndexResolver getResolver(IndexHandle handle)
return result;
}

/**
* NETFLIX addition
*/
// *********************
//
// NETFLIX addition
//
// **********************

public synchronized void flush(String catalogName){
resolvers.remove(catalogName);
}

/**
* NETFLIX addition
*/
public synchronized void flushAll(){
resolvers.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,16 @@ public ConnectorHandleResolver resolverFor(String id)
return resolver;
}

// *********************
//
// NETFLIX addition
//
// **********************

/**
* NETFLIX addition
*/
public synchronized void flush(String catalogName){
handleIdResolvers.remove(catalogName);
}

/**
* NETFLIX addition
*/
public synchronized void flushAll(){
handleIdResolvers.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,20 +787,18 @@ private static JsonCodec<ViewDefinition> createTestingViewCodec()
}


//////////////////////////////////////////////////////////////////////////////////////////////////
// *********************
//
// NETFLIX addition
//
// **********************

/**
* NETFLIX addition
*/
public synchronized void flush(String catalogName){
informationSchemasByCatalog.remove(catalogName);
connectorsByCatalog.remove(catalogName);
connectorsById.remove(catalogName);
}

/**
* NETFLIX addition
*/
public synchronized void flushAll(){
informationSchemasByCatalog.clear();
connectorsByCatalog.clear();
Expand All @@ -810,6 +808,7 @@ public synchronized void flushAll(){
/**
* Creates a schema with the given <code>schemaName</code>
* @param session connector session
* @param schemaMetadata schema metadata
*/
public void createSchema(Session session, ConnectorSchemaMetadata schemaMetadata) {
String schemaName = session.getSchema();
Expand All @@ -829,6 +828,7 @@ public void createSchema(Session session, ConnectorSchemaMetadata schemaMetadata
/**
* Updates a schema with the given <code>schemaName</code>
* @param session connector session
* @param schemaMetadata schema metadata
*/
public void updateSchema(Session session, ConnectorSchemaMetadata schemaMetadata) {
String schemaName = session.getSchema();
Expand All @@ -847,6 +847,7 @@ public void updateSchema(Session session, ConnectorSchemaMetadata schemaMetadata

/**
* Drop a schema with the given <code>schemaName</code>
* @param session connector session
*/
public void dropSchema(Session session) {
String schemaName = session.getSchema();
Expand All @@ -865,6 +866,8 @@ public void dropSchema(Session session) {

/**
* Return a schema with the given <code>schemaName</code>
* @param session connector session
* @return Return a schema with the given schemaName
*/
public ConnectorSchemaMetadata getSchema(Session session) {
String schemaName = session.getSchema();
Expand All @@ -883,6 +886,9 @@ public ConnectorSchemaMetadata getSchema(Session session) {

/**
* Updates a table using the specified table metadata.
* @param session connector session
* @param tableMetadata table metadata
* @return table handle
*/
public ConnectorTableHandle alterTable(Session session, TableMetadata tableMetadata) {
ConnectorMetadataEntry entry = validateCatalogName(session.getCatalog());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,15 @@ private ConnectorPageSinkProvider providerFor(String connectorId)
return provider;
}

/**
* NETFLIX addition
*/
// *********************
//
// NETFLIX addition
//
// **********************

public synchronized void flush(String catalogName){
pageSinkProviders.remove(catalogName);
}

/**
* NETFLIX addition
*/
public synchronized void flushAll(){
pageSinkProviders.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,15 @@ private ConnectorPageSourceProvider getPageSourceProvider(Split split)
return provider;
}

/**
* NETFLIX addition
*/
// *********************
//
// NETFLIX addition
//
// **********************

public synchronized void flush(String catalogName){
pageSourceProviders.remove(catalogName);
}

/**
* NETFLIX addition
*/
public synchronized void flushAll(){
pageSourceProviders.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,16 @@ public ConnectorSplitManager getConnectorSplitManager(String connectorId)
return result;
}

///////////////////////////////////////////////////////////////////////////////////////
// *********************
//
// NETFLIX addition
//
// **********************

/**
* NETFLIX addition
*/
public synchronized void flush(String catalogName){
splitManagers.remove(catalogName);
}

/**
* NETFLIX addition
*/
public synchronized void flushAll(){
splitManagers.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

public interface CatalogService {
/**
* @param name Qualified name of the catalog
* @return the information about the given catalog
* @throws javax.ws.rs.NotFoundException if the catalog is not found
*/
Expand Down
Loading

0 comments on commit 19d385a

Please sign in to comment.