Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code after ConnectorId to CatalogName renamed #639

Merged
merged 1 commit into from
Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public FullConnectorSession(
this.session = requireNonNull(session, "session is null");
this.identity = requireNonNull(identity, "identity is null");
this.properties = ImmutableMap.copyOf(requireNonNull(properties, "properties is null"));
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.catalog = requireNonNull(catalog, "catalog is null");
this.sessionPropertyManager = requireNonNull(sessionPropertyManager, "sessionPropertyManager is null");
this.isLegacyTimestamp = SystemSessionProperties.isLegacyTimestamp(session);
Expand Down
2 changes: 1 addition & 1 deletion presto-main/src/main/java/io/prestosql/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public ConnectorSession toConnectorSession()

public ConnectorSession toConnectorSession(CatalogName catalogName)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");

return new FullConnectorSession(
this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public ConnectorAwareNodeManager(InternalNodeManager nodeManager, String environ
{
this.nodeManager = requireNonNull(nodeManager, "nodeManager is null");
this.environment = requireNonNull(environment, "environment is null");
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ private static class MaterializedConnector

public MaterializedConnector(CatalogName catalogName, Connector connector)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.connector = requireNonNull(connector, "connector is null");

splitManager = connector.getSplitManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public SystemConnector(
SystemTablesProvider tables,
Function<TransactionId, ConnectorTransactionHandle> transactionHandleFunction)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(nodeManager, "nodeManager is null");
requireNonNull(tables, "tables is null");
requireNonNull(transactionHandleFunction, "transactionHandleFunction is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ public class SystemTransactionHandle
TransactionId transactionId,
Function<TransactionId, ConnectorTransactionHandle> transactionHandleFunction)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.transactionId = requireNonNull(transactionId, "transactionId is null");
requireNonNull(transactionHandleFunction, "transactionHandleFunction is null");
this.connectorTransactionHandle = Suppliers.memoize(() -> transactionHandleFunction.apply(transactionId));
}

@JsonCreator
public SystemTransactionHandle(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("transactionId") TransactionId transactionId,
@JsonProperty("connectorTransactionHandle") ConnectorTransactionHandle connectorTransactionHandle)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.transactionId = requireNonNull(transactionId, "transactionId is null");
requireNonNull(connectorTransactionHandle, "connectorTransactionHandle is null");
this.connectorTransactionHandle = () -> connectorTransactionHandle;
Expand Down
4 changes: 2 additions & 2 deletions presto-main/src/main/java/io/prestosql/execution/Input.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ public final class Input

@JsonCreator
public Input(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("schema") String schema,
@JsonProperty("table") String table,
@JsonProperty("connectorInfo") Optional<Object> connectorInfo,
@JsonProperty("columns") List<Column> columns)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(schema, "schema is null");
requireNonNull(table, "table is null");
requireNonNull(connectorInfo, "connectorInfo is null");
Expand Down
4 changes: 2 additions & 2 deletions presto-main/src/main/java/io/prestosql/execution/Output.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public final class Output

@JsonCreator
public Output(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("schema") String schema,
@JsonProperty("table") String table)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.schema = requireNonNull(schema, "schema is null");
this.table = requireNonNull(table, "table is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class IndexManager

public void addIndexProvider(CatalogName catalogName, ConnectorIndexProvider indexProvider)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(indexProvider, "indexProvider is null");
checkState(providers.putIfAbsent(catalogName, indexProvider) == null, "IndexProvider for connector '%s' is already registered", catalogName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected AbstractPropertyManager(String propertyType, ErrorCodeSupplier propert

public final void addProperties(CatalogName catalogName, List<PropertyMetadata<?>> properties)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(properties, "properties is null");

Map<String, PropertyMetadata<?>> propertiesByName = Maps.uniqueIndex(properties, PropertyMetadata::getName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public class AnalyzeTableHandle

@JsonCreator
public AnalyzeTableHandle(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("transactionHandle") ConnectorTransactionHandle transactionHandle,
@JsonProperty("connectorHandle") ConnectorTableHandle connectorHandle)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
this.connectorHandle = requireNonNull(connectorHandle, "connectorHandle is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public CatalogMetadata(
ConnectorTransactionHandle systemTablesTransactionHandle,
Set<ConnectorCapabilities> connectorCapabilities)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.metadata = requireNonNull(metadata, "metadata is null");
this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
this.informationSchemaId = requireNonNull(informationSchemaId, "informationSchemaId is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public final class IndexHandle

@JsonCreator
public IndexHandle(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("transactionHandle") ConnectorTransactionHandle transactionHandle,
@JsonProperty("connectorHandle") ConnectorIndexHandle connectorHandle)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
this.connectorHandle = requireNonNull(connectorHandle, "connectorHandle is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public final class InsertTableHandle

@JsonCreator
public InsertTableHandle(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("transactionHandle") ConnectorTransactionHandle transactionHandle,
@JsonProperty("connectorHandle") ConnectorInsertTableHandle connectorHandle)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
this.connectorHandle = requireNonNull(connectorHandle, "connectorHandle is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public class NewTableLayout

@JsonCreator
public NewTableLayout(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("transactionHandle") ConnectorTransactionHandle transactionHandle,
@JsonProperty("layout") ConnectorNewTableLayout layout)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
this.layout = requireNonNull(layout, "layout is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public final class OutputTableHandle

@JsonCreator
public OutputTableHandle(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("transactionHandle") ConnectorTransactionHandle transactionHandle,
@JsonProperty("connectorHandle") ConnectorOutputTableHandle connectorHandle)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
this.connectorHandle = requireNonNull(connectorHandle, "connectorHandle is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public ProcedureRegistry(TypeManager typeManager)

public void addProcedures(CatalogName catalogName, Collection<Procedure> procedures)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(procedures, "procedures is null");

procedures.forEach(this::validateProcedure);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class ResolvedIndex

public ResolvedIndex(CatalogName catalogName, ConnectorTransactionHandle transactionHandle, ConnectorResolvedIndex index)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(index, "index is null");

indexHandle = new IndexHandle(catalogName, transactionHandle, index.getIndexHandle());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void addSystemSessionProperty(PropertyMetadata<?> sessionProperty)

public void addConnectorSessionProperties(CatalogName catalogName, List<PropertyMetadata<?>> properties)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(properties, "properties is null");

Map<String, PropertyMetadata<?>> propertiesByName = Maps.uniqueIndex(properties, PropertyMetadata::getName);
Expand All @@ -112,7 +112,7 @@ public Optional<PropertyMetadata<?>> getSystemSessionPropertyMetadata(String nam

public Optional<PropertyMetadata<?>> getConnectorSessionPropertyMetadata(CatalogName catalogName, String propertyName)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(propertyName, "propertyName is null");
Map<String, PropertyMetadata<?>> properties = connectorSessionProperties.get(catalogName);
if (properties == null || properties.isEmpty()) {
Expand Down
4 changes: 2 additions & 2 deletions presto-main/src/main/java/io/prestosql/metadata/Split.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public final class Split

@JsonCreator
public Split(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("connectorSplit") ConnectorSplit connectorSplit,
@JsonProperty("lifespan") Lifespan lifespan)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.connectorSplit = requireNonNull(connectorSplit, "connectorSplit is null");
this.lifespan = requireNonNull(lifespan, "lifespan is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public final class TableHandle

@JsonCreator
public TableHandle(
@JsonProperty("connectorId") CatalogName catalogName,
@JsonProperty("catalogName") CatalogName catalogName,
@JsonProperty("connectorHandle") ConnectorTableHandle connectorHandle,
@JsonProperty("transaction") ConnectorTransactionHandle transaction,
@JsonProperty("layout") Optional<ConnectorTableLayoutHandle> layout)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.connectorHandle = requireNonNull(connectorHandle, "connectorHandle is null");
this.transaction = requireNonNull(transaction, "transaction is null");
this.layout = requireNonNull(layout, "layout is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class TableProperties

public TableProperties(CatalogName catalogName, ConnectorTransactionHandle transaction, ConnectorTableProperties tableProperties)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(transaction, "transaction is null");
requireNonNull(tableProperties, "layout is null");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void addSystemAccessControlFactory(SystemAccessControlFactory accessContr

public void addCatalogAccessControl(CatalogName catalogName, ConnectorAccessControl accessControl)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(accessControl, "accessControl is null");
checkState(connectorAccessControl.putIfAbsent(catalogName, new CatalogAccessControlEntry(catalogName, accessControl)) == null,
"Access control for connector '%s' is already registered", catalogName);
Expand Down Expand Up @@ -784,7 +784,7 @@ private class CatalogAccessControlEntry

public CatalogAccessControlEntry(CatalogName catalogName, ConnectorAccessControl accessControl)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.accessControl = requireNonNull(accessControl, "accessControl is null");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class ConnectorAwareSplitSource

public ConnectorAwareSplitSource(CatalogName catalogName, ConnectorSplitSource source)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.source = requireNonNull(source, "source is null");
}

Expand Down
4 changes: 2 additions & 2 deletions presto-main/src/main/java/io/prestosql/split/EmptySplit.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public class EmptySplit

@JsonCreator
public EmptySplit(
@JsonProperty("connectorId") CatalogName catalogName)
@JsonProperty("catalogName") CatalogName catalogName)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class PageSinkManager

public void addConnectorPageSinkProvider(CatalogName catalogName, ConnectorPageSinkProvider pageSinkProvider)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(pageSinkProvider, "pageSinkProvider is null");
checkState(pageSinkProviders.put(catalogName, pageSinkProvider) == null, "PageSinkProvider for connector '%s' is already registered", catalogName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class PageSourceManager

public void addConnectorPageSourceProvider(CatalogName catalogName, ConnectorPageSourceProvider pageSourceProvider)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(pageSourceProvider, "pageSourceProvider is null");
checkState(pageSourceProviders.put(catalogName, pageSourceProvider) == null, "PageSourceProvider for connector '%s' is already registered", catalogName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public SplitManager(QueryManagerConfig config, Metadata metadata)

public void addConnectorSplitManager(CatalogName catalogName, ConnectorSplitManager connectorSplitManager)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(connectorSplitManager, "connectorSplitManager is null");
checkState(splitManagers.putIfAbsent(catalogName, connectorSplitManager) == null, "SplitManager for connector '%s' is already registered", catalogName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public NodePartitioningManager(NodeScheduler nodeScheduler)

public void addPartitioningProvider(CatalogName catalogName, ConnectorNodePartitioningProvider nodePartitioningProvider)
{
requireNonNull(catalogName, "connectorId is null");
requireNonNull(catalogName, "catalogName is null");
requireNonNull(nodePartitioningProvider, "nodePartitioningProvider is null");
checkArgument(partitioningProviders.putIfAbsent(catalogName, nodePartitioningProvider) == null,
"NodePartitioningProvider for connector '%s' is already registered", catalogName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ private static class ConnectorTransactionMetadata

public ConnectorTransactionMetadata(CatalogName catalogName, Connector connector, ConnectorTransactionHandle transactionHandle)
{
this.catalogName = requireNonNull(catalogName, "connectorId is null");
this.catalogName = requireNonNull(catalogName, "catalogName is null");
this.connector = requireNonNull(connector, "connector is null");
this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
this.connectorMetadata = connector.getMetadata(transactionHandle);
Expand Down