Examples of MetaDataClient


Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.dropIndex(ExecutableDropIndexStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.alterIndex(ExecutableAlterIndexStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.addColumn(ExecutableAddColumnStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.dropColumn(ExecutableDropColumnStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                // Catch column/column family not found exception, as our meta data may
                // be out of sync. Update the cache once and retry if we were out of sync.
                // Otherwise throw, as we'll just get the same error next time.
                if (retryOnce) {
                    retryOnce = false;
                    MetaDataMutationResult result = new MetaDataClient(connection).updateCache(schemaName, tableName);
                    if (result.wasUpdated()) {
                        continue;
                    }
                }
                throw e;
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

     */
    private long[] validate() throws SQLException {
        int i = 0;
        Long scn = connection.getSCN();
        PName tenantId = connection.getTenantId();
        MetaDataClient client = new MetaDataClient(connection);
        long[] timeStamps = new long[this.mutations.size()];
        for (Map.Entry<TableRef, Map<ImmutableBytesPtr,Map<PColumn,byte[]>>> entry : mutations.entrySet()) {
            TableRef tableRef = entry.getKey();
            long serverTimeStamp = tableRef.getTimeStamp();
            PTable table = tableRef.getTable();
            // If we're auto committing, we've already validated the schema when we got the ColumnResolver,
            // so no need to do it again here.
            if (!connection.getAutoCommit()) {
                MetaDataMutationResult result = client.updateCache(table.getSchemaName().getString(), table.getTableName().getString());
                long timestamp = result.getMutationTime();
                if (timestamp != QueryConstants.UNSET_TIMESTAMP) {
                    serverTimeStamp = timestamp;
                    if (result.wasUpdated()) {
                        // TODO: use bitset?
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

     */
    private long[] validate() throws SQLException {
        int i = 0;
        Long scn = connection.getSCN();
        PName tenantId = connection.getTenantId();
        MetaDataClient client = new MetaDataClient(connection);
        long[] timeStamps = new long[this.mutations.size()];
        for (Map.Entry<TableRef, Map<ImmutableBytesPtr,Map<PColumn,byte[]>>> entry : mutations.entrySet()) {
            TableRef tableRef = entry.getKey();
            long serverTimeStamp = tableRef.getTimeStamp();
            PTable table = tableRef.getTable();
            if (!connection.getAutoCommit()) {
                MetaDataMutationResult result = client.updateCache(table.getSchemaName().getString(), table.getTableName().getString());
                long timestamp = result.getMutationTime();
                if (timestamp != QueryConstants.UNSET_TIMESTAMP) {
                    serverTimeStamp = timestamp;
                    if (result.wasUpdated()) {
                        // TODO: use bitset?
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.dropTable(ExecutableDropTableStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.dropIndex(ExecutableDropIndexStatement.this);
                }
            };
        }
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient

                    return stmt.getConnection();
                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.alterIndex(ExecutableAlterIndexStatement.this);
                }
            };
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.