PHOENIX-4763: Changing a base table property value should be reflected in child views (if the property wasn't changed)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6cb7a613 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6cb7a613 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6cb7a613 Branch: refs/heads/4.x-HBase-1.2 Commit: 6cb7a6139f50013650d6b18dc28922b78055a5f0 Parents: b530877 Author: Chinmay Kulkarni <chinmayskulka...@gmail.com> Authored: Sun Dec 9 21:07:41 2018 -0800 Committer: Chinmay Kulkarni <chinmayskulka...@gmail.com> Committed: Mon Dec 10 14:08:34 2018 -0800 ---------------------------------------------------------------------- .../phoenix/end2end/AlterTableWithViewsIT.java | 117 ++++-- .../end2end/ExplainPlanWithStatsEnabledIT.java | 8 +- .../phoenix/end2end/PropertiesInSyncIT.java | 6 +- .../IndexHalfStoreFileReaderGenerator.java | 3 +- .../apache/phoenix/compile/DeleteCompiler.java | 2 +- .../apache/phoenix/compile/JoinCompiler.java | 2 +- .../compile/TupleProjectionCompiler.java | 3 +- .../apache/phoenix/compile/UpsertCompiler.java | 2 +- .../apache/phoenix/compile/WhereOptimizer.java | 3 +- .../coprocessor/MetaDataEndpointImpl.java | 134 +++++-- .../phoenix/coprocessor/MetaDataProtocol.java | 32 +- .../coprocessor/generated/MetaDataProtos.java | 356 +++++++++---------- .../coprocessor/generated/PTableProtos.java | 99 +++--- .../generated/ServerCachingProtos.java | 122 +++---- .../apache/phoenix/index/IndexMaintainer.java | 16 +- .../index/PhoenixIndexFailurePolicy.java | 2 +- .../apache/phoenix/schema/DelegateTable.java | 12 +- .../apache/phoenix/schema/MetaDataClient.java | 25 +- .../java/org/apache/phoenix/schema/PTable.java | 6 +- .../org/apache/phoenix/schema/PTableImpl.java | 56 ++- .../org/apache/phoenix/util/MetaDataUtil.java | 46 ++- .../apache/phoenix/util/MetaDataUtilTest.java | 115 ++++-- phoenix-protocol/src/main/MetaDataService.proto | 4 +- phoenix-protocol/src/main/PTable.proto | 2 +- .../src/main/ServerCachingService.proto | 2 +- 25 files changed, 739 insertions(+), 436 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java index 9e7aaa2..82a119f 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java @@ -73,6 +73,8 @@ import org.junit.runners.Parameterized.Parameters; import com.google.common.base.Function; import com.google.common.collect.Lists; +import static org.apache.phoenix.query.QueryServicesOptions.DEFAULT_USE_STATS_FOR_PARALLELIZATION; + @RunWith(Parameterized.class) public class AlterTableWithViewsIT extends SplitSystemCatalogIT { @@ -174,41 +176,53 @@ public class AlterTableWithViewsIT extends SplitSystemCatalogIT { conn.createStatement().execute(generateDDL("UPDATE_CACHE_FREQUENCY=2", ddlFormat)); viewConn.createStatement().execute("CREATE VIEW " + viewOfTable1 + " ( VIEW_COL1 DECIMAL(10,2), VIEW_COL2 VARCHAR ) AS SELECT * FROM " + tableName); viewConn.createStatement().execute("CREATE VIEW " + viewOfTable2 + " ( VIEW_COL1 DECIMAL(10,2), VIEW_COL2 VARCHAR ) AS SELECT * FROM " + tableName); - - viewConn.createStatement().execute("ALTER VIEW " + viewOfTable2 + " SET UPDATE_CACHE_FREQUENCY = 1"); - - PhoenixConnection phoenixConn = conn.unwrap(PhoenixConnection.class); - PTable table = phoenixConn.getTable(new PTableKey(null, tableName)); PName tenantId = isMultiTenant ? PNameFactory.newName(TENANT1) : null; - assertFalse(table.isImmutableRows()); - assertEquals(2, table.getUpdateCacheFrequency()); + + // Initially all property values should be the same for the base table and its views + PTable table = conn.unwrap(PhoenixConnection.class).getTable(new PTableKey(null, tableName)); PTable viewTable1 = viewConn.unwrap(PhoenixConnection.class).getTable(new PTableKey(tenantId, viewOfTable1)); + PTable viewTable2 = viewConn.unwrap(PhoenixConnection.class).getTable(new PTableKey(tenantId, viewOfTable2)); + assertFalse(table.isImmutableRows()); assertFalse(viewTable1.isImmutableRows()); + assertFalse(viewTable2.isImmutableRows()); + assertEquals(2, table.getUpdateCacheFrequency()); assertEquals(2, viewTable1.getUpdateCacheFrequency()); + assertEquals(2, viewTable2.getUpdateCacheFrequency()); + assertNull(table.useStatsForParallelization()); + assertNull(viewTable1.useStatsForParallelization()); + assertNull(viewTable2.useStatsForParallelization()); + + // Alter a property value for one of the views + viewConn.createStatement().execute("ALTER VIEW " + viewOfTable2 + + " SET UPDATE_CACHE_FREQUENCY=1, USE_STATS_FOR_PARALLELIZATION=false"); // query the view to force the table cache to be updated viewConn.createStatement().execute("SELECT * FROM "+viewOfTable2); - PTable viewTable2 = viewConn.unwrap(PhoenixConnection.class).getTable(new PTableKey(tenantId, viewOfTable2)); - assertFalse(viewTable2.isImmutableRows()); + viewTable2 = viewConn.unwrap(PhoenixConnection.class).getTable(new PTableKey(tenantId, viewOfTable2)); assertEquals(1, viewTable2.getUpdateCacheFrequency()); - - conn.createStatement().execute("ALTER TABLE " + tableName + " SET IMMUTABLE_ROWS=true, UPDATE_CACHE_FREQUENCY=3"); + assertFalse(viewTable2.useStatsForParallelization()); + + // Alter a property value for the base table. So the view for which this property was + // not modified earlier should get the base table's altered property value + conn.createStatement().execute("ALTER TABLE " + tableName + + " SET IMMUTABLE_ROWS=true, UPDATE_CACHE_FREQUENCY=3, " + + "USE_STATS_FOR_PARALLELIZATION=true"); // query the views to force the table cache to be updated viewConn.createStatement().execute("SELECT * FROM "+viewOfTable1); viewConn.createStatement().execute("SELECT * FROM "+viewOfTable2); - - phoenixConn = conn.unwrap(PhoenixConnection.class); - table = phoenixConn.getTable(new PTableKey(null, tableName)); - assertTrue(table.isImmutableRows()); - assertEquals(3, table.getUpdateCacheFrequency()); - + table = conn.unwrap(PhoenixConnection.class).getTable(new PTableKey(null, tableName)); viewTable1 = viewConn.unwrap(PhoenixConnection.class).getTable(new PTableKey(tenantId, viewOfTable1)); - assertTrue(viewTable1.isImmutableRows()); - assertEquals(2, viewTable1.getUpdateCacheFrequency()); - viewTable2 = viewConn.unwrap(PhoenixConnection.class).getTable(new PTableKey(tenantId, viewOfTable2)); + assertTrue(table.isImmutableRows()); + assertTrue(viewTable1.isImmutableRows()); assertTrue(viewTable2.isImmutableRows()); - // update cache frequency is not propagated to the view since it was altered on the view + assertEquals(3, table.getUpdateCacheFrequency()); + // The updated property value in the base table is reflected in this view + assertEquals(3, viewTable1.getUpdateCacheFrequency()); + // The update property is not propagated to this view since it was altered on the view assertEquals(1, viewTable2.getUpdateCacheFrequency()); + assertTrue(table.useStatsForParallelization()); + assertTrue(viewTable1.useStatsForParallelization()); + assertFalse(viewTable2.useStatsForParallelization()); long gpw = 1000000; conn.createStatement().execute("ALTER TABLE " + tableName + " SET GUIDE_POSTS_WIDTH=" + gpw); @@ -234,6 +248,67 @@ public class AlterTableWithViewsIT extends SplitSystemCatalogIT { assertTrue(rs.wasNull()); } } + + @Test + public void testCreateViewWithPropsMaintainsOwnProps() throws Exception { + try (Connection conn = DriverManager.getConnection(getUrl()); + Connection viewConn = isMultiTenant ? + DriverManager.getConnection(TENANT_SPECIFIC_URL1) : conn) { + String tableName = SchemaUtil.getTableName(SCHEMA1, generateUniqueName()); + String viewOfTable1 = SchemaUtil.getTableName(SCHEMA2, generateUniqueName()); + String viewOfTable2 = SchemaUtil.getTableName(SCHEMA3, generateUniqueName()); + + String ddlFormat = "CREATE TABLE IF NOT EXISTS " + tableName + " (" + + " %s ID char(1) NOT NULL," + " COL1 integer NOT NULL, COL2 bigint NOT NULL," + + " CONSTRAINT NAME_PK PRIMARY KEY (%s ID, COL1, COL2)) %s "; + conn.createStatement().execute(generateDDL("UPDATE_CACHE_FREQUENCY=2", ddlFormat)); + + viewConn.createStatement().execute("CREATE VIEW " + viewOfTable1 + + " ( VIEW_COL1 DECIMAL(10,2), VIEW_COL2 VARCHAR ) AS SELECT * FROM " + + tableName + " UPDATE_CACHE_FREQUENCY=7"); + viewConn.createStatement().execute("CREATE VIEW " + viewOfTable2 + + " ( VIEW_COL1 DECIMAL(10,2), VIEW_COL2 VARCHAR ) AS SELECT * FROM " + + tableName + " USE_STATS_FOR_PARALLELIZATION=true"); + PName tenantId = isMultiTenant ? PNameFactory.newName(TENANT1) : null; + + // Initially, property values not specified during view creation should be the same for + // the base table and its views those specified should have corresponding values + PTable table = conn.unwrap(PhoenixConnection.class) + .getTable(new PTableKey(null, tableName)); + PTable viewTable1 = viewConn.unwrap(PhoenixConnection.class) + .getTable(new PTableKey(tenantId, viewOfTable1)); + PTable viewTable2 = viewConn.unwrap(PhoenixConnection.class) + .getTable(new PTableKey(tenantId, viewOfTable2)); + assertEquals(2, table.getUpdateCacheFrequency()); + assertEquals(7, viewTable1.getUpdateCacheFrequency()); + assertEquals(2, viewTable2.getUpdateCacheFrequency()); + assertNull(table.useStatsForParallelization()); + assertNull(viewTable1.useStatsForParallelization()); + assertTrue(viewTable2.useStatsForParallelization()); + + // Alter a property value for the base table. So the view for which this property was + // not explicitly set or modified earlier should get the base table's new property value + conn.createStatement().execute("ALTER TABLE " + tableName + + " SET UPDATE_CACHE_FREQUENCY=3, USE_STATS_FOR_PARALLELIZATION=false"); + // query the views to force the table cache to be updated + viewConn.createStatement().execute("SELECT * FROM " + viewOfTable1); + viewConn.createStatement().execute("SELECT * FROM " + viewOfTable2); + table = conn.unwrap(PhoenixConnection.class) + .getTable(new PTableKey(null, tableName)); + viewTable1 = viewConn.unwrap(PhoenixConnection.class) + .getTable(new PTableKey(tenantId, viewOfTable1)); + viewTable2 = viewConn.unwrap(PhoenixConnection.class) + .getTable(new PTableKey(tenantId, viewOfTable2)); + assertEquals(3, table.getUpdateCacheFrequency()); + // The updated property value is only propagated to the view in which we did not specify + // a value for the property during view creation or alter its value later on + assertEquals(7, viewTable1.getUpdateCacheFrequency()); + assertEquals(3, viewTable2.getUpdateCacheFrequency()); + assertFalse(table.useStatsForParallelization()); + assertFalse(viewTable1.useStatsForParallelization()); + assertTrue(viewTable2.useStatsForParallelization()); + } + } @Test public void testDropColumnsFromBaseTableWithView() throws Exception { http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java index 0dc4410..bd95dc1 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java @@ -1220,12 +1220,8 @@ public class ExplainPlanWithStatsEnabledIT extends ParallelStatsEnabledIT { tenantConn.createStatement().execute("CREATE VIEW " + tenantViewName + " AS SELECT * FROM " + viewName); conn.createStatement() .execute("ALTER TABLE " + tableName + " set USE_STATS_FOR_PARALLELIZATION=" + useStats); - // changing a property on a base table does not change the property on a view - validatePropertyOnViewIndex(viewName, viewIndexName, !useStats, conn, tenantConn); - - // need to explicitly change the property on the view - conn.createStatement() - .execute("ALTER VIEW " + viewName + " set USE_STATS_FOR_PARALLELIZATION=" + useStats); + // changing a property on a base table is propagated to its view + // if the view has not previously modified the property validatePropertyOnViewIndex(viewName, viewIndexName, useStats, conn, tenantConn); } } http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/it/java/org/apache/phoenix/end2end/PropertiesInSyncIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PropertiesInSyncIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PropertiesInSyncIT.java index 348b195..30288e5 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PropertiesInSyncIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PropertiesInSyncIT.java @@ -398,8 +398,10 @@ public class PropertiesInSyncIT extends ParallelStatsDisabledIT { } } // Now synchronize required properties and verify HBase metadata property values - syncTableAndIndexProperties(conn.unwrap(PhoenixConnection.class), - conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()); + PhoenixConnection upgradeConn = conn.unwrap(PhoenixConnection.class); + // Simulate an upgrade by setting the upgrade flag + upgradeConn.setRunningUpgrade(true); + syncTableAndIndexProperties(upgradeConn, upgradeConn.getQueryServices().getAdmin()); for (String t: createdTables) { verifyHBaseColumnFamilyProperties(t, conn, false, false); } http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java index e56dd9d..fcf8547 100644 --- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java +++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java @@ -59,7 +59,6 @@ import org.apache.phoenix.schema.PTable.IndexType; import org.apache.phoenix.schema.PTableType; import org.apache.phoenix.util.ByteUtil; import org.apache.phoenix.util.IndexUtil; -import org.apache.phoenix.util.MetaDataUtil; import org.apache.phoenix.util.QueryUtil; import org.apache.phoenix.util.RepairUtil; @@ -157,7 +156,7 @@ public class IndexHalfStoreFileReaderGenerator extends BaseRegionObserver { for (PTable index : indexes) { if (index.getIndexType() == IndexType.LOCAL) { IndexMaintainer indexMaintainer = index.getIndexMaintainer(dataTable, conn); - indexMaintainers.put(new ImmutableBytesWritable(index.getViewIndexType().toBytes(index.getViewIndexId())), + indexMaintainers.put(new ImmutableBytesWritable(index.getviewIndexIdType().toBytes(index.getViewIndexId())), indexMaintainer); } } http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java index ed21374..d414205 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java @@ -156,7 +156,7 @@ public class DeleteCompiler { int offset = (table.getBucketNum() == null ? 0 : 1); byte[][] values = new byte[pkColumns.size()][]; if (isSharedViewIndex) { - values[offset++] = table.getViewIndexType().toBytes(table.getViewIndexId()); + values[offset++] = table.getviewIndexIdType().toBytes(table.getViewIndexId()); } if (isMultiTenant) { values[offset++] = tenantIdBytes; http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java index 807e54b..b2b660e 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java @@ -1283,7 +1283,7 @@ public class JoinCompiler { .setMultiTenant(left.isMultiTenant()) .setStoreNulls(left.getStoreNulls()) .setViewType(left.getViewType()) - .setViewIndexType(left.getViewIndexType()) + .setViewIndexIdType(left.getviewIndexIdType()) .setViewIndexId(left.getViewIndexId()) .setIndexType(left.getIndexType()) .setTransactionProvider(left.getTransactionProvider()) http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/phoenix/compile/TupleProjectionCompiler.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/TupleProjectionCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/TupleProjectionCompiler.java index 5b92a5d..40a0ee4 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/TupleProjectionCompiler.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/TupleProjectionCompiler.java @@ -18,7 +18,6 @@ package org.apache.phoenix.compile; import static org.apache.phoenix.query.QueryConstants.VALUE_COLUMN_FAMILY; import static org.apache.phoenix.query.QueryConstants.BASE_TABLE_BASE_COLUMN_COUNT; -import static org.apache.phoenix.schema.PTable.ImmutableStorageScheme; import java.sql.SQLException; import java.util.ArrayList; @@ -203,7 +202,7 @@ public class TupleProjectionCompiler { .setMultiTenant(table.isMultiTenant()) .setStoreNulls(table.getStoreNulls()) .setViewType(table.getViewType()) - .setViewIndexType(table.getViewIndexType()) + .setViewIndexIdType(table.getviewIndexIdType()) .setViewIndexId(table.getViewIndexId()) .setTransactionProvider(table.getTransactionProvider()) .setUpdateCacheFrequency(table.getUpdateCacheFrequency()) http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java index 410ac22..a770339 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java @@ -753,7 +753,7 @@ public class UpsertCompiler { final byte[][] values = new byte[nValuesToSet][]; int nodeIndex = 0; if (isSharedViewIndex) { - values[nodeIndex++] = table.getViewIndexType().toBytes(table.getViewIndexId()); + values[nodeIndex++] = table.getviewIndexIdType().toBytes(table.getViewIndexId()); } if (isTenantSpecific) { PName tenantId = connection.getTenantId(); http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java index b2e4c41..b845a09 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java @@ -69,7 +69,6 @@ import org.apache.phoenix.schema.types.PDataType; import org.apache.phoenix.schema.types.PVarbinary; import org.apache.phoenix.schema.types.PVarchar; import org.apache.phoenix.util.ByteUtil; -import org.apache.phoenix.util.MetaDataUtil; import org.apache.phoenix.util.ScanUtil; import org.apache.phoenix.util.SchemaUtil; @@ -179,7 +178,7 @@ public class WhereOptimizer { // Add unique index ID for shared indexes on views. This ensures // that different indexes don't interleave. if (hasViewIndex) { - byte[] viewIndexBytes = table.getViewIndexType().toBytes(table.getViewIndexId()); + byte[] viewIndexBytes = table.getviewIndexIdType().toBytes(table.getViewIndexId()); KeyRange indexIdKeyRange = KeyRange.getKeyRange(viewIndexBytes); cnf.add(Collections.singletonList(indexIdKeyRange)); pkPos++; http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java index d138132..cd9efee 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java @@ -87,7 +87,6 @@ import java.security.PrivilegedExceptionAction; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; -import java.sql.Timestamp; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -464,6 +463,9 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso // index for link type key value that is used to store linking rows private static final int LINK_TYPE_INDEX = 0; + // Used to add a tag to a cell when a view modifies a table property to indicate that this + // property should not be derived from the base table + private static final byte[] VIEW_MODIFIED_PROPERTY_BYTES = Bytes.toBytes(1); private static final KeyValue CLASS_NAME_KV = createFirstOnRow(ByteUtil.EMPTY_BYTE_ARRAY, TABLE_FAMILY_BYTES, CLASS_NAME_BYTES); private static final KeyValue JAR_PATH_KV = createFirstOnRow(ByteUtil.EMPTY_BYTE_ARRAY, TABLE_FAMILY_BYTES, JAR_PATH_BYTES); @@ -786,11 +788,12 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso // now go up from child to parent all the way to the base table: PTable baseTable = null; + PTable immediateParent = null; long maxTableTimestamp = -1; int numPKCols = table.getPKColumns().size(); for (int i = 0; i < ancestorList.size(); i++) { TableInfo parentTableInfo = ancestorList.get(i); - PTable pTable = null; + PTable pTable; String fullParentTableName = SchemaUtil.getTableName(parentTableInfo.getSchemaName(), parentTableInfo.getTableName()); PName parentTenantId = @@ -815,6 +818,9 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso if (pTable == null) { throw new ParentTableNotFoundException(parentTableInfo, fullTableName); } else { + if (immediateParent == null) { + immediateParent = pTable; + } // only combine columns for view indexes (and not local indexes on regular tables // which also have a viewIndexId) if (i == 0 && hasIndexId && pTable.getType() != PTableType.VIEW) { @@ -951,13 +957,21 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso isDiverged ? QueryConstants.DIVERGED_VIEW_BASE_COLUMN_COUNT : columnsToAdd.size() - myColumns.size() + (isSalted ? 1 : 0); + // Inherit view-modifiable properties from the parent table/view if the current view has + // not previously modified this property + Long updateCacheFreq = (table.getType() != PTableType.VIEW || + table.hasViewModifiedUpdateCacheFrequency()) ? + table.getUpdateCacheFrequency() : immediateParent.getUpdateCacheFrequency(); + Boolean useStatsForParallelization = (table.getType() != PTableType.VIEW || + table.hasViewModifiedUseStatsForParallelization()) ? + table.useStatsForParallelization() : immediateParent.useStatsForParallelization(); // When creating a PTable for views or view indexes, use the baseTable PTable for attributes // inherited from the physical base table. // if a TableProperty is not valid on a view we set it to the base table value // if a TableProperty is valid on a view and is not mutable on a view we set it to the base table value - // if a TableProperty is valid on a view and is mutable on a view we use the value set on the view - // TODO Implement PHOENIX-4763 to set the view properties correctly instead of just - // setting them same as the base table + // if a TableProperty is valid on a view and is mutable on a view, we use the value set + // on the view if the view had previously modified the property, otherwise we propagate the + // value from the base table (see PHOENIX-4763) PTableImpl pTable = PTableImpl.builderWithColumns(table, columnsToAdd) .setImmutableRows(baseTable.isImmutableRows()) .setDisableWAL(baseTable.isWALDisabled()) @@ -974,6 +988,8 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso .setTimeStamp(maxTableTimestamp) .setExcludedColumns(excludedColumns == null ? ImmutableList.<PColumn>of() : ImmutableList.copyOf(excludedColumns)) + .setUpdateCacheFrequency(updateCacheFreq) + .setUseStatsForParallelization(useStatsForParallelization) .build(); return WhereConstantParser.addViewInfoToPColumnsIfNeeded(pTable); } @@ -1436,8 +1452,8 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso } Cell viewTypeKv = tableKeyValues[VIEW_TYPE_INDEX]; ViewType viewType = viewTypeKv == null ? null : ViewType.fromSerializedValue(viewTypeKv.getValueArray()[viewTypeKv.getValueOffset()]); - PDataType viewIndexType = getViewIndexType(tableKeyValues); - Long viewIndexId = getViewIndexId(tableKeyValues, viewIndexType); + PDataType viewIndexIdType = getViewIndexIdType(tableKeyValues); + Long viewIndexId = getViewIndexId(tableKeyValues, viewIndexIdType); Cell indexTypeKv = tableKeyValues[INDEX_TYPE_INDEX]; IndexType indexType = indexTypeKv == null ? null : IndexType.fromSerializedValue(indexTypeKv.getValueArray()[indexTypeKv.getValueOffset()]); Cell baseColumnCountKv = tableKeyValues[BASE_COLUMN_COUNT_INDEX]; @@ -1449,6 +1465,12 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso long updateCacheFrequency = updateCacheFrequencyKv == null ? 0 : PLong.INSTANCE.getCodec().decodeLong(updateCacheFrequencyKv.getValueArray(), updateCacheFrequencyKv.getValueOffset(), SortOrder.getDefault()); + + // Check the cell tag to see whether the view has modified this property + final byte[] tagUpdateCacheFreq = (updateCacheFrequencyKv == null) ? + HConstants.EMPTY_BYTE_ARRAY : CellUtil.getTagArray(updateCacheFrequencyKv); + boolean viewModifiedUpdateCacheFrequency = (PTableType.VIEW.equals(tableType)) && + Bytes.contains(tagUpdateCacheFreq, VIEW_MODIFIED_PROPERTY_BYTES); Cell indexDisableTimestampKv = tableKeyValues[INDEX_DISABLE_TIMESTAMP]; long indexDisableTimestamp = indexDisableTimestampKv == null ? 0L : PLong.INSTANCE.getCodec().decodeLong(indexDisableTimestampKv.getValueArray(), indexDisableTimestampKv.getValueOffset(), SortOrder.getDefault()); @@ -1474,6 +1496,12 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso encodingSchemeKv.getValueOffset(), encodingSchemeKv.getValueLength())); Cell useStatsForParallelizationKv = tableKeyValues[USE_STATS_FOR_PARALLELIZATION_INDEX]; Boolean useStatsForParallelization = useStatsForParallelizationKv == null ? null : Boolean.TRUE.equals(PBoolean.INSTANCE.toObject(useStatsForParallelizationKv.getValueArray(), useStatsForParallelizationKv.getValueOffset(), useStatsForParallelizationKv.getValueLength())); + + // Check the cell tag to see whether the view has modified this property + final byte[] tagUseStatsForParallelization = (useStatsForParallelizationKv == null) ? + HConstants.EMPTY_BYTE_ARRAY : CellUtil.getTagArray(useStatsForParallelizationKv); + boolean viewModifiedUseStatsForParallelization = (PTableType.VIEW.equals(tableType)) && + Bytes.contains(tagUseStatsForParallelization, VIEW_MODIFIED_PROPERTY_BYTES); List<PColumn> columns = Lists.newArrayListWithExpectedSize(columnCount); List<PTable> indexes = Lists.newArrayList(); @@ -1529,7 +1557,7 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso .setMultiTenant(multiTenant) .setStoreNulls(storeNulls) .setViewType(viewType) - .setViewIndexType(viewIndexType) + .setViewIndexIdType(viewIndexIdType) .setViewIndexId(viewIndexId) .setIndexType(indexType) .setTransactionProvider(transactionProvider) @@ -1557,28 +1585,30 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso .setParentTableName(parentTableName) .setPhysicalNames(physicalTables == null ? ImmutableList.<PName>of() : ImmutableList.copyOf(physicalTables)) + .setViewModifiedUpdateCacheFrequency(viewModifiedUpdateCacheFrequency) + .setViewModifiedUseStatsForParallelization(viewModifiedUseStatsForParallelization) .setColumns(columns) .build(); } - private Long getViewIndexId(Cell[] tableKeyValues, PDataType viewIndexType) { + private Long getViewIndexId(Cell[] tableKeyValues, PDataType viewIndexIdType) { Cell viewIndexIdKv = tableKeyValues[VIEW_INDEX_ID_INDEX]; return viewIndexIdKv == null ? null : - decodeViewIndexId(viewIndexIdKv, viewIndexType); + decodeViewIndexId(viewIndexIdKv, viewIndexIdType); } /** * Returns viewIndexId based on its underlying data type * - * @param tableKeyValues - * @param viewIndexType + * @param viewIndexIdKv + * @param viewIndexIdType * @return */ - private Long decodeViewIndexId(Cell viewIndexIdKv, PDataType viewIndexType) { - return viewIndexType.getCodec().decodeLong(viewIndexIdKv.getValueArray(), + private Long decodeViewIndexId(Cell viewIndexIdKv, PDataType viewIndexIdType) { + return viewIndexIdType.getCodec().decodeLong(viewIndexIdKv.getValueArray(), viewIndexIdKv.getValueOffset(), SortOrder.getDefault()); } - private PDataType getViewIndexType(Cell[] tableKeyValues) { + private PDataType getViewIndexIdType(Cell[] tableKeyValues) { Cell dataTypeKv = tableKeyValues[VIEW_INDEX_ID_DATA_TYPE_INDEX]; return dataTypeKv == null ? MetaDataUtil.getLegacyViewIndexIdDataType() : @@ -2349,6 +2379,12 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso return; } + if (tableType == PTableType.VIEW) { + // Pass in the parent's PTable so that we only tag cells corresponding to the + // view's property in case they are different from the parent + addTagsToPutsForViewAlteredProperties(tableMetadata, parentTable); + } + // When we drop a view we first drop the view metadata and then drop the parent->child linking row List<Mutation> localMutations = Lists.newArrayListWithExpectedSize(tableMetadata.size()); @@ -2406,7 +2442,7 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso builder.setReturnCode(MetaDataProtos.MutationCode.TABLE_NOT_FOUND); if (indexId != null) { builder.setViewIndexId(indexId); - builder.setViewIndexType(PLong.INSTANCE.getSqlType()); + builder.setViewIndexIdType(PLong.INSTANCE.getSqlType()); } builder.setMutationTime(currentTimeStamp); done.run(builder.build()); @@ -3514,19 +3550,23 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso } } tableMetaData.addAll(additionalTableMetadataMutations); - if (type == PTableType.VIEW - && EncodedColumnsUtil.usesEncodedColumnNames(table) && addingCol + if (type == PTableType.VIEW) { + if (EncodedColumnsUtil.usesEncodedColumnNames(table) && addingCol && !table.isAppendOnlySchema()) { - // When adding a column to a view that uses encoded column name - // scheme, we need to modify the CQ counters stored in the view's - // physical table. So to make sure clients get the latest PTable, we - // need to invalidate the cache entry. - // If the table uses APPEND_ONLY_SCHEMA we use the position of the - // column as the encoded column qualifier and so we don't need to - // update the CQ counter in the view physical table (see - // PHOENIX-4737) - invalidateList.add(new ImmutableBytesPtr( - MetaDataUtil.getPhysicalTableRowForView(table))); + // When adding a column to a view that uses encoded column name + // scheme, we need to modify the CQ counters stored in the view's + // physical table. So to make sure clients get the latest PTable, we + // need to invalidate the cache entry. + // If the table uses APPEND_ONLY_SCHEMA we use the position of the + // column as the encoded column qualifier and so we don't need to + // update the CQ counter in the view physical table (see + // PHOENIX-4737) + invalidateList.add(new ImmutableBytesPtr( + MetaDataUtil.getPhysicalTableRowForView(table))); + } + // Pass in null as the parent PTable, since we always want to tag the cells + // in this case, irrespective of the property values of the parent + addTagsToPutsForViewAlteredProperties(tableMetaData, null); } return null; } @@ -3541,6 +3581,44 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso } } + /** + * See PHOENIX-4763. If we are modifying any table-level properties that are mutable on a view, + * we mark these cells in SYSTEM.CATALOG with tags to indicate that this view property should + * not be kept in-sync with the base table and so we shouldn't propagate the base table's + * property value when resolving the view + * @param tableMetaData list of mutations on the view + * @param parent PTable of the parent or null + */ + private void addTagsToPutsForViewAlteredProperties(List<Mutation> tableMetaData, + PTable parent) { + byte[] parentUpdateCacheFreqBytes = null; + byte[] parentUseStatsForParallelizationBytes = null; + if (parent != null) { + parentUpdateCacheFreqBytes = new byte[PLong.INSTANCE.getByteSize()]; + PLong.INSTANCE.getCodec().encodeLong(parent.getUpdateCacheFrequency(), + parentUpdateCacheFreqBytes, 0); + if (parent.useStatsForParallelization() != null) { + parentUseStatsForParallelizationBytes = + PBoolean.INSTANCE.toBytes(parent.useStatsForParallelization()); + } + } + for (Mutation m: tableMetaData) { + if (m instanceof Put) { + MetaDataUtil.conditionallyAddTagsToPutCells((Put)m, + PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, + PhoenixDatabaseMetaData.UPDATE_CACHE_FREQUENCY_BYTES, + parentUpdateCacheFreqBytes, + VIEW_MODIFIED_PROPERTY_BYTES); + MetaDataUtil.conditionallyAddTagsToPutCells((Put)m, + PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, + PhoenixDatabaseMetaData.USE_STATS_FOR_PARALLELIZATION_BYTES, + parentUseStatsForParallelizationBytes, + VIEW_MODIFIED_PROPERTY_BYTES); + } + + } + } + private PTable doGetTable(byte[] tenantId, byte[] schemaName, byte[] tableName, long clientTimeStamp, int clientVersion) throws IOException, SQLException { return doGetTable(tenantId, schemaName, tableName, clientTimeStamp, null, clientVersion, http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java index 86878c2..4160b8b 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java @@ -175,7 +175,7 @@ public abstract class MetaDataProtocol extends MetaDataService { private PName tableName; private List<PColumn> columns; private List<PName> physicalNames; - private PDataType viewIndexType; + private PDataType viewIndexIdType; private Long viewIndexId; public SharedTableState(PTable table) { @@ -184,7 +184,7 @@ public abstract class MetaDataProtocol extends MetaDataService { this.tableName = table.getTableName(); this.columns = table.getColumns(); this.physicalNames = table.getPhysicalNames(); - this.viewIndexType = table.getViewIndexType(); + this.viewIndexIdType = table.getviewIndexIdType(); this.viewIndexId = table.getViewIndexId(); } @@ -208,8 +208,8 @@ public abstract class MetaDataProtocol extends MetaDataService { } }); this.viewIndexId = sharedTable.getViewIndexId(); - this.viewIndexType = sharedTable.hasViewIndexType() - ? PDataType.fromTypeId(sharedTable.getViewIndexType()) + this.viewIndexIdType = sharedTable.hasViewIndexIdType() + ? PDataType.fromTypeId(sharedTable.getViewIndexIdType()) : MetaDataUtil.getLegacyViewIndexIdDataType(); } @@ -237,8 +237,8 @@ public abstract class MetaDataProtocol extends MetaDataService { return viewIndexId; } - public PDataType getViewIndexType() { - return viewIndexType; + public PDataType getViewIndexIdType() { + return viewIndexIdType; } } @@ -253,7 +253,7 @@ public abstract class MetaDataProtocol extends MetaDataService { private boolean wasUpdated; private PSchema schema; private Long viewIndexId; - private PDataType viewIndexType; + private PDataType viewIndexIdType; private List<PFunction> functions = new ArrayList<PFunction>(1); private long autoPartitionNum; @@ -298,10 +298,10 @@ public abstract class MetaDataProtocol extends MetaDataService { this.tableNamesToDelete = tableNamesToDelete; } - public MetaDataMutationResult(MutationCode returnCode, int currentTime, PTable table, long viewIndexId, PDataType viewIndexType ) { + public MetaDataMutationResult(MutationCode returnCode, int currentTime, PTable table, long viewIndexId, PDataType viewIndexIdType) { this(returnCode, currentTime, table, Collections.<byte[]> emptyList()); this.viewIndexId = viewIndexId; - this.viewIndexType = viewIndexType; + this.viewIndexIdType = viewIndexIdType; } public MetaDataMutationResult(MutationCode returnCode, long currentTime, PTable table, List<byte[]> tableNamesToDelete, List<SharedTableState> sharedTablesToDelete) { @@ -361,8 +361,8 @@ public abstract class MetaDataProtocol extends MetaDataService { return viewIndexId; } - public PDataType getViewIndexType() { - return viewIndexType; + public PDataType getViewIndexIdType() { + return viewIndexIdType; } public static MetaDataMutationResult constructFromProto(MetaDataResponse proto) { @@ -410,8 +410,8 @@ public abstract class MetaDataProtocol extends MetaDataService { result.viewIndexId = proto.getViewIndexId(); } - result.viewIndexType = proto.hasViewIndexType() - ? PDataType.fromTypeId(proto.getViewIndexType()) + result.viewIndexIdType = proto.hasViewIndexIdType() + ? PDataType.fromTypeId(proto.getViewIndexIdType()) : MetaDataUtil.getLegacyViewIndexIdDataType(); return result; } @@ -453,7 +453,7 @@ public abstract class MetaDataProtocol extends MetaDataService { sharedTableStateBuilder.setSchemaName(ByteStringer.wrap(sharedTableState.getSchemaName().getBytes())); sharedTableStateBuilder.setTableName(ByteStringer.wrap(sharedTableState.getTableName().getBytes())); sharedTableStateBuilder.setViewIndexId(sharedTableState.getViewIndexId()); - sharedTableStateBuilder.setViewIndexType(sharedTableState.viewIndexType.getSqlType()); + sharedTableStateBuilder.setViewIndexIdType(sharedTableState.viewIndexIdType.getSqlType()); builder.addSharedTablesToDelete(sharedTableStateBuilder.build()); } } @@ -464,9 +464,9 @@ public abstract class MetaDataProtocol extends MetaDataService { if (result.getViewIndexId() != null) { builder.setViewIndexId(result.getViewIndexId()); } - builder.setViewIndexType(result.getViewIndexType() == null + builder.setViewIndexIdType(result.getViewIndexIdType() == null ? MetaDataUtil.getLegacyViewIndexIdDataType().getSqlType() - : result.getViewIndexType().getSqlType()); + : result.getViewIndexIdType().getSqlType()); } return builder.build(); } http://git-wip-us.apache.org/repos/asf/phoenix/blob/6cb7a613/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java index 360dd77..d8152a9 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java @@ -379,15 +379,15 @@ public final class MetaDataProtos { */ long getViewIndexId(); - // optional int32 viewIndexType = 7 [default = 5]; + // optional int32 viewIndexIdType = 7 [default = 5]; /** - * <code>optional int32 viewIndexType = 7 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 7 [default = 5];</code> */ - boolean hasViewIndexType(); + boolean hasViewIndexIdType(); /** - * <code>optional int32 viewIndexType = 7 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 7 [default = 5];</code> */ - int getViewIndexType(); + int getViewIndexIdType(); } /** * Protobuf type {@code SharedTableState} @@ -478,7 +478,7 @@ public final class MetaDataProtos { } case 56: { bitField0_ |= 0x00000010; - viewIndexType_ = input.readInt32(); + viewIndexIdType_ = input.readInt32(); break; } } @@ -650,20 +650,20 @@ public final class MetaDataProtos { return viewIndexId_; } - // optional int32 viewIndexType = 7 [default = 5]; - public static final int VIEWINDEXTYPE_FIELD_NUMBER = 7; - private int viewIndexType_; + // optional int32 viewIndexIdType = 7 [default = 5]; + public static final int VIEWINDEXIDTYPE_FIELD_NUMBER = 7; + private int viewIndexIdType_; /** - * <code>optional int32 viewIndexType = 7 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 7 [default = 5];</code> */ - public boolean hasViewIndexType() { + public boolean hasViewIndexIdType() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * <code>optional int32 viewIndexType = 7 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 7 [default = 5];</code> */ - public int getViewIndexType() { - return viewIndexType_; + public int getViewIndexIdType() { + return viewIndexIdType_; } private void initFields() { @@ -673,7 +673,7 @@ public final class MetaDataProtos { columns_ = java.util.Collections.emptyList(); physicalNames_ = java.util.Collections.emptyList(); viewIndexId_ = 0L; - viewIndexType_ = 5; + viewIndexIdType_ = 5; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -724,7 +724,7 @@ public final class MetaDataProtos { output.writeInt64(6, viewIndexId_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(7, viewIndexType_); + output.writeInt32(7, viewIndexIdType_); } getUnknownFields().writeTo(output); } @@ -766,7 +766,7 @@ public final class MetaDataProtos { } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(7, viewIndexType_); + .computeInt32Size(7, viewIndexIdType_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -815,10 +815,10 @@ public final class MetaDataProtos { result = result && (getViewIndexId() == other.getViewIndexId()); } - result = result && (hasViewIndexType() == other.hasViewIndexType()); - if (hasViewIndexType()) { - result = result && (getViewIndexType() - == other.getViewIndexType()); + result = result && (hasViewIndexIdType() == other.hasViewIndexIdType()); + if (hasViewIndexIdType()) { + result = result && (getViewIndexIdType() + == other.getViewIndexIdType()); } result = result && getUnknownFields().equals(other.getUnknownFields()); @@ -857,9 +857,9 @@ public final class MetaDataProtos { hash = (37 * hash) + VIEWINDEXID_FIELD_NUMBER; hash = (53 * hash) + hashLong(getViewIndexId()); } - if (hasViewIndexType()) { - hash = (37 * hash) + VIEWINDEXTYPE_FIELD_NUMBER; - hash = (53 * hash) + getViewIndexType(); + if (hasViewIndexIdType()) { + hash = (37 * hash) + VIEWINDEXIDTYPE_FIELD_NUMBER; + hash = (53 * hash) + getViewIndexIdType(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -987,7 +987,7 @@ public final class MetaDataProtos { bitField0_ = (bitField0_ & ~0x00000010); viewIndexId_ = 0L; bitField0_ = (bitField0_ & ~0x00000020); - viewIndexType_ = 5; + viewIndexIdType_ = 5; bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -1050,7 +1050,7 @@ public final class MetaDataProtos { if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000010; } - result.viewIndexType_ = viewIndexType_; + result.viewIndexIdType_ = viewIndexIdType_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -1115,8 +1115,8 @@ public final class MetaDataProtos { if (other.hasViewIndexId()) { setViewIndexId(other.getViewIndexId()); } - if (other.hasViewIndexType()) { - setViewIndexType(other.getViewIndexType()); + if (other.hasViewIndexIdType()) { + setViewIndexIdType(other.getViewIndexIdType()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -1616,35 +1616,35 @@ public final class MetaDataProtos { return this; } - // optional int32 viewIndexType = 7 [default = 5]; - private int viewIndexType_ = 5; + // optional int32 viewIndexIdType = 7 [default = 5]; + private int viewIndexIdType_ = 5; /** - * <code>optional int32 viewIndexType = 7 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 7 [default = 5];</code> */ - public boolean hasViewIndexType() { + public boolean hasViewIndexIdType() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * <code>optional int32 viewIndexType = 7 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 7 [default = 5];</code> */ - public int getViewIndexType() { - return viewIndexType_; + public int getViewIndexIdType() { + return viewIndexIdType_; } /** - * <code>optional int32 viewIndexType = 7 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 7 [default = 5];</code> */ - public Builder setViewIndexType(int value) { + public Builder setViewIndexIdType(int value) { bitField0_ |= 0x00000040; - viewIndexType_ = value; + viewIndexIdType_ = value; onChanged(); return this; } /** - * <code>optional int32 viewIndexType = 7 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 7 [default = 5];</code> */ - public Builder clearViewIndexType() { + public Builder clearViewIndexIdType() { bitField0_ = (bitField0_ & ~0x00000040); - viewIndexType_ = 5; + viewIndexIdType_ = 5; onChanged(); return this; } @@ -1825,15 +1825,15 @@ public final class MetaDataProtos { */ long getViewIndexId(); - // optional int32 viewIndexType = 13 [default = 5]; + // optional int32 viewIndexIdType = 13 [default = 5]; /** - * <code>optional int32 viewIndexType = 13 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 13 [default = 5];</code> */ - boolean hasViewIndexType(); + boolean hasViewIndexIdType(); /** - * <code>optional int32 viewIndexType = 13 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 13 [default = 5];</code> */ - int getViewIndexType(); + int getViewIndexIdType(); } /** * Protobuf type {@code MetaDataResponse} @@ -1979,7 +1979,7 @@ public final class MetaDataProtos { } case 104: { bitField0_ |= 0x00000200; - viewIndexType_ = input.readInt32(); + viewIndexIdType_ = input.readInt32(); break; } } @@ -2282,20 +2282,20 @@ public final class MetaDataProtos { return viewIndexId_; } - // optional int32 viewIndexType = 13 [default = 5]; - public static final int VIEWINDEXTYPE_FIELD_NUMBER = 13; - private int viewIndexType_; + // optional int32 viewIndexIdType = 13 [default = 5]; + public static final int VIEWINDEXIDTYPE_FIELD_NUMBER = 13; + private int viewIndexIdType_; /** - * <code>optional int32 viewIndexType = 13 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 13 [default = 5];</code> */ - public boolean hasViewIndexType() { + public boolean hasViewIndexIdType() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * <code>optional int32 viewIndexType = 13 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 13 [default = 5];</code> */ - public int getViewIndexType() { - return viewIndexType_; + public int getViewIndexIdType() { + return viewIndexIdType_; } private void initFields() { @@ -2311,7 +2311,7 @@ public final class MetaDataProtos { schema_ = org.apache.phoenix.coprocessor.generated.PSchemaProtos.PSchema.getDefaultInstance(); autoPartitionNum_ = 0L; viewIndexId_ = 0L; - viewIndexType_ = 5; + viewIndexIdType_ = 5; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2386,7 +2386,7 @@ public final class MetaDataProtos { output.writeInt64(12, viewIndexId_); } if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeInt32(13, viewIndexType_); + output.writeInt32(13, viewIndexIdType_); } getUnknownFields().writeTo(output); } @@ -2452,7 +2452,7 @@ public final class MetaDataProtos { } if (((bitField0_ & 0x00000200) == 0x00000200)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(13, viewIndexType_); + .computeInt32Size(13, viewIndexIdType_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2528,10 +2528,10 @@ public final class MetaDataProtos { result = result && (getViewIndexId() == other.getViewIndexId()); } - result = result && (hasViewIndexType() == other.hasViewIndexType()); - if (hasViewIndexType()) { - result = result && (getViewIndexType() - == other.getViewIndexType()); + result = result && (hasViewIndexIdType() == other.hasViewIndexIdType()); + if (hasViewIndexIdType()) { + result = result && (getViewIndexIdType() + == other.getViewIndexIdType()); } result = result && getUnknownFields().equals(other.getUnknownFields()); @@ -2594,9 +2594,9 @@ public final class MetaDataProtos { hash = (37 * hash) + VIEWINDEXID_FIELD_NUMBER; hash = (53 * hash) + hashLong(getViewIndexId()); } - if (hasViewIndexType()) { - hash = (37 * hash) + VIEWINDEXTYPE_FIELD_NUMBER; - hash = (53 * hash) + getViewIndexType(); + if (hasViewIndexIdType()) { + hash = (37 * hash) + VIEWINDEXIDTYPE_FIELD_NUMBER; + hash = (53 * hash) + getViewIndexIdType(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -2751,7 +2751,7 @@ public final class MetaDataProtos { bitField0_ = (bitField0_ & ~0x00000400); viewIndexId_ = 0L; bitField0_ = (bitField0_ & ~0x00000800); - viewIndexType_ = 5; + viewIndexIdType_ = 5; bitField0_ = (bitField0_ & ~0x00001000); return this; } @@ -2851,7 +2851,7 @@ public final class MetaDataProtos { if (((from_bitField0_ & 0x00001000) == 0x00001000)) { to_bitField0_ |= 0x00000200; } - result.viewIndexType_ = viewIndexType_; + result.viewIndexIdType_ = viewIndexIdType_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2957,8 +2957,8 @@ public final class MetaDataProtos { if (other.hasViewIndexId()) { setViewIndexId(other.getViewIndexId()); } - if (other.hasViewIndexType()) { - setViewIndexType(other.getViewIndexType()); + if (other.hasViewIndexIdType()) { + setViewIndexIdType(other.getViewIndexIdType()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4040,35 +4040,35 @@ public final class MetaDataProtos { return this; } - // optional int32 viewIndexType = 13 [default = 5]; - private int viewIndexType_ = 5; + // optional int32 viewIndexIdType = 13 [default = 5]; + private int viewIndexIdType_ = 5; /** - * <code>optional int32 viewIndexType = 13 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 13 [default = 5];</code> */ - public boolean hasViewIndexType() { + public boolean hasViewIndexIdType() { return ((bitField0_ & 0x00001000) == 0x00001000); } /** - * <code>optional int32 viewIndexType = 13 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 13 [default = 5];</code> */ - public int getViewIndexType() { - return viewIndexType_; + public int getViewIndexIdType() { + return viewIndexIdType_; } /** - * <code>optional int32 viewIndexType = 13 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 13 [default = 5];</code> */ - public Builder setViewIndexType(int value) { + public Builder setViewIndexIdType(int value) { bitField0_ |= 0x00001000; - viewIndexType_ = value; + viewIndexIdType_ = value; onChanged(); return this; } /** - * <code>optional int32 viewIndexType = 13 [default = 5];</code> + * <code>optional int32 viewIndexIdType = 13 [default = 5];</code> */ - public Builder clearViewIndexType() { + public Builder clearViewIndexIdType() { bitField0_ = (bitField0_ & ~0x00001000); - viewIndexType_ = 5; + viewIndexIdType_ = 5; onChanged(); return this; } @@ -17827,105 +17827,105 @@ public final class MetaDataProtos { static { java.lang.String[] descriptorData = { "\n\025MetaDataService.proto\032\014PTable.proto\032\017P" + - "Function.proto\032\rPSchema.proto\"\254\001\n\020Shared" + + "Function.proto\032\rPSchema.proto\"\256\001\n\020Shared" + "TableState\022\020\n\010tenantId\030\001 \001(\014\022\022\n\nschemaNa" + "me\030\002 \002(\014\022\021\n\ttableName\030\003 \002(\014\022\031\n\007columns\030\004" + " \003(\0132\010.PColumn\022\025\n\rphysicalNames\030\005 \003(\014\022\023\n" + - "\013viewIndexId\030\006 \002(\003\022\030\n\rviewIndexType\030\007 \001(" + - "\005:\0015\"\353\002\n\020MetaDataResponse\022!\n\nreturnCode\030" + - "\001 \001(\0162\r.MutationCode\022\024\n\014mutationTime\030\002 \001" + - "(\003\022\026\n\005table\030\003 \001(\0132\007.PTable\022\026\n\016tablesToDe" + - "lete\030\004 \003(\014\022\022\n\ncolumnName\030\005 \001(\014\022\022\n\nfamily", - "Name\030\006 \001(\014\022\024\n\014functionName\030\007 \001(\014\022\034\n\010func" + - "tion\030\010 \003(\0132\n.PFunction\022/\n\024sharedTablesTo" + - "Delete\030\t \003(\0132\021.SharedTableState\022\030\n\006schem" + - "a\030\n \001(\0132\010.PSchema\022\030\n\020autoPartitionNum\030\013 " + - "\001(\003\022\023\n\013viewIndexId\030\014 \001(\003\022\030\n\rviewIndexTyp" + - "e\030\r \001(\005:\0015\"\364\001\n\017GetTableRequest\022\020\n\010tenant" + - "Id\030\001 \002(\014\022\022\n\nschemaName\030\002 \002(\014\022\021\n\ttableNam" + - "e\030\003 \002(\014\022\026\n\016tableTimestamp\030\004 \002(\003\022\027\n\017clien" + - "tTimestamp\030\005 \002(\003\022\025\n\rclientVersion\030\006 \001(\005\022" + - "\037\n\027skipAddingParentColumns\030\007 \001(\010\022\031\n\021skip", - "AddingIndexes\030\010 \001(\010\022$\n\023lockedAncestorTab" + - "le\030\t \001(\0132\007.PTable\"\212\001\n\023GetFunctionsReques" + - "t\022\020\n\010tenantId\030\001 \002(\014\022\025\n\rfunctionNames\030\002 \003" + - "(\014\022\032\n\022functionTimestamps\030\003 \003(\003\022\027\n\017client" + - "Timestamp\030\004 \002(\003\022\025\n\rclientVersion\030\005 \001(\005\"V" + - "\n\020GetSchemaRequest\022\022\n\nschemaName\030\001 \002(\t\022\027" + - "\n\017clientTimestamp\030\002 \002(\003\022\025\n\rclientVersion" + - "\030\003 \002(\005\"d\n\022CreateTableRequest\022\036\n\026tableMet" + + "\013viewIndexId\030\006 \002(\003\022\032\n\017viewIndexIdType\030\007 " + + "\001(\005:\0015\"\355\002\n\020MetaDataResponse\022!\n\nreturnCod" + + "e\030\001 \001(\0162\r.MutationCode\022\024\n\014mutationTime\030\002" + + " \001(\003\022\026\n\005table\030\003 \001(\0132\007.PTable\022\026\n\016tablesTo" + + "Delete\030\004 \003(\014\022\022\n\ncolumnName\030\005 \001(\014\022\022\n\nfami", + "lyName\030\006 \001(\014\022\024\n\014functionName\030\007 \001(\014\022\034\n\010fu" + + "nction\030\010 \003(\0132\n.PFunction\022/\n\024sharedTables" + + "ToDelete\030\t \003(\0132\021.SharedTableState\022\030\n\006sch" + + "ema\030\n \001(\0132\010.PSchema\022\030\n\020autoPartitionNum\030" + + "\013 \001(\003\022\023\n\013viewIndexId\030\014 \001(\003\022\032\n\017viewIndexI" + + "dType\030\r \001(\005:\0015\"\364\001\n\017GetTableRequest\022\020\n\010te" + + "nantId\030\001 \002(\014\022\022\n\nschemaName\030\002 \002(\014\022\021\n\ttabl" + + "eName\030\003 \002(\014\022\026\n\016tableTimestamp\030\004 \002(\003\022\027\n\017c" + + "lientTimestamp\030\005 \002(\003\022\025\n\rclientVersion\030\006 " + + "\001(\005\022\037\n\027skipAddingParentColumns\030\007 \001(\010\022\031\n\021", + "skipAddingIndexes\030\010 \001(\010\022$\n\023lockedAncesto" + + "rTable\030\t \001(\0132\007.PTable\"\212\001\n\023GetFunctionsRe" + + "quest\022\020\n\010tenantId\030\001 \002(\014\022\025\n\rfunctionNames" + + "\030\002 \003(\014\022\032\n\022functionTimestamps\030\003 \003(\003\022\027\n\017cl" + + "ientTimestamp\030\004 \002(\003\022\025\n\rclientVersion\030\005 \001" + + "(\005\"V\n\020GetSchemaRequest\022\022\n\nschemaName\030\001 \002" + + "(\t\022\027\n\017clientTimestamp\030\002 \002(\003\022\025\n\rclientVer" + + "sion\030\003 \002(\005\"d\n\022CreateTableRequest\022\036\n\026tabl" + + "eMetadataMutations\030\001 \003(\014\022\025\n\rclientVersio" + + "n\030\002 \001(\005\022\027\n\017allocateIndexId\030\003 \001(\010\"r\n\025Crea", + "teFunctionRequest\022\036\n\026tableMetadataMutati" + + "ons\030\001 \003(\014\022\021\n\ttemporary\030\002 \002(\010\022\017\n\007replace\030" + + "\003 \001(\010\022\025\n\rclientVersion\030\004 \001(\005\"`\n\023CreateSc" + + "hemaRequest\022\036\n\026tableMetadataMutations\030\001 " + + "\003(\014\022\022\n\nschemaName\030\002 \002(\t\022\025\n\rclientVersion" + + "\030\003 \002(\005\"\216\001\n\020DropTableRequest\022\036\n\026tableMeta" + + "dataMutations\030\001 \003(\014\022\021\n\ttableType\030\002 \002(\t\022\017" + + "\n\007cascade\030\003 \001(\010\022\025\n\rclientVersion\030\004 \001(\005\022\037" + + "\n\027skipAddingParentColumns\030\005 \001(\010\"_\n\021DropS" + + "chemaRequest\022\037\n\027schemaMetadataMutations\030", + "\001 \003(\014\022\022\n\nschemaName\030\002 \002(\t\022\025\n\rclientVersi" + + "on\030\003 \002(\005\"I\n\020AddColumnRequest\022\036\n\026tableMet" + "adataMutations\030\001 \003(\014\022\025\n\rclientVersion\030\002 " + - "\001(\005\022\027\n\017allocateIndexId\030\003 \001(\010\"r\n\025CreateFu", - "nctionRequest\022\036\n\026tableMetadataMutations\030" + - "\001 \003(\014\022\021\n\ttemporary\030\002 \002(\010\022\017\n\007replace\030\003 \001(" + - "\010\022\025\n\rclientVersion\030\004 \001(\005\"`\n\023CreateSchema" + - "Request\022\036\n\026tableMetadataMutations\030\001 \003(\014\022" + - "\022\n\nschemaName\030\002 \002(\t\022\025\n\rclientVersion\030\003 \002" + - "(\005\"\216\001\n\020DropTableRequest\022\036\n\026tableMetadata" + - "Mutations\030\001 \003(\014\022\021\n\ttableType\030\002 \002(\t\022\017\n\007ca" + - "scade\030\003 \001(\010\022\025\n\rclientVersion\030\004 \001(\005\022\037\n\027sk" + - "ipAddingParentColumns\030\005 \001(\010\"_\n\021DropSchem" + - "aRequest\022\037\n\027schemaMetadataMutations\030\001 \003(", - "\014\022\022\n\nschemaName\030\002 \002(\t\022\025\n\rclientVersion\030\003" + - " \002(\005\"I\n\020AddColumnRequest\022\036\n\026tableMetadat" + + "\001(\005\"J\n\021DropColumnRequest\022\036\n\026tableMetadat" + "aMutations\030\001 \003(\014\022\025\n\rclientVersion\030\002 \001(\005\"" + - "J\n\021DropColumnRequest\022\036\n\026tableMetadataMut" + - "ations\030\001 \003(\014\022\025\n\rclientVersion\030\002 \001(\005\"^\n\023D" + - "ropFunctionRequest\022\036\n\026tableMetadataMutat" + - "ions\030\001 \003(\014\022\020\n\010ifExists\030\002 \001(\010\022\025\n\rclientVe" + - "rsion\030\003 \001(\005\"P\n\027UpdateIndexStateRequest\022\036" + - "\n\026tableMetadataMutations\030\001 \003(\014\022\025\n\rclient" + - "Version\030\002 \001(\005\"*\n\021ClearCacheRequest\022\025\n\rcl", - "ientVersion\030\001 \001(\005\"*\n\022ClearCacheResponse\022" + - "\024\n\014unfreedBytes\030\001 \001(\003\"*\n\021GetVersionReque" + - "st\022\025\n\rclientVersion\030\001 \001(\005\"E\n\022GetVersionR" + - "esponse\022\017\n\007version\030\001 \002(\003\022\036\n\026systemCatalo" + - "gTimestamp\030\002 \001(\003\"\205\001\n\032ClearTableFromCache" + - "Request\022\020\n\010tenantId\030\001 \002(\014\022\022\n\nschemaName\030" + - "\002 \002(\014\022\021\n\ttableName\030\003 \002(\014\022\027\n\017clientTimest" + - "amp\030\004 \002(\003\022\025\n\rclientVersion\030\005 \001(\005\"\035\n\033Clea" + - "rTableFromCacheResponse*\271\005\n\014MutationCode" + - "\022\030\n\024TABLE_ALREADY_EXISTS\020\000\022\023\n\017TABLE_NOT_", - "FOUND\020\001\022\024\n\020COLUMN_NOT_FOUND\020\002\022\031\n\025COLUMN_" + - "ALREADY_EXISTS\020\003\022\035\n\031CONCURRENT_TABLE_MUT" + - "ATION\020\004\022\027\n\023TABLE_NOT_IN_REGION\020\005\022\025\n\021NEWE" + - "R_TABLE_FOUND\020\006\022\034\n\030UNALLOWED_TABLE_MUTAT" + - "ION\020\007\022\021\n\rNO_PK_COLUMNS\020\010\022\032\n\026PARENT_TABLE" + - "_NOT_FOUND\020\t\022\033\n\027FUNCTION_ALREADY_EXISTS\020" + - "\n\022\026\n\022FUNCTION_NOT_FOUND\020\013\022\030\n\024NEWER_FUNCT" + - "ION_FOUND\020\014\022\032\n\026FUNCTION_NOT_IN_REGION\020\r\022" + - "\031\n\025SCHEMA_ALREADY_EXISTS\020\016\022\026\n\022NEWER_SCHE" + - "MA_FOUND\020\017\022\024\n\020SCHEMA_NOT_FOUND\020\020\022\030\n\024SCHE", - "MA_NOT_IN_REGION\020\021\022\032\n\026TABLES_EXIST_ON_SC" + - "HEMA\020\022\022\035\n\031UNALLOWED_SCHEMA_MUTATION\020\023\022%\n" + - "!AUTO_PARTITION_SEQUENCE_NOT_FOUND\020\024\022#\n\037" + - "CANNOT_COERCE_AUTO_PARTITION_ID\020\025\022\024\n\020TOO" + - "_MANY_INDEXES\020\026\022\037\n\033UNABLE_TO_CREATE_CHIL" + - "D_LINK\020\027\022!\n\035UNABLE_TO_UPDATE_PARENT_TABL" + - "E\020\0302\345\006\n\017MetaDataService\022/\n\010getTable\022\020.Ge" + - "tTableRequest\032\021.MetaDataResponse\0227\n\014getF" + - "unctions\022\024.GetFunctionsRequest\032\021.MetaDat" + - "aResponse\0221\n\tgetSchema\022\021.GetSchemaReques", - "t\032\021.MetaDataResponse\0225\n\013createTable\022\023.Cr" + - "eateTableRequest\032\021.MetaDataResponse\022;\n\016c" + - "reateFunction\022\026.CreateFunctionRequest\032\021." + - "MetaDataResponse\0227\n\014createSchema\022\024.Creat" + - "eSchemaRequest\032\021.MetaDataResponse\0221\n\tdro" + - "pTable\022\021.DropTableRequest\032\021.MetaDataResp" + - "onse\0223\n\ndropSchema\022\022.DropSchemaRequest\032\021" + - ".MetaDataResponse\0227\n\014dropFunction\022\024.Drop" + - "FunctionRequest\032\021.MetaDataResponse\0221\n\tad" + - "dColumn\022\021.AddColumnRequest\032\021.MetaDataRes", - "ponse\0223\n\ndropColumn\022\022.DropColumnRequest\032" + - "\021.MetaDataResponse\022?\n\020updateIndexState\022\030" + - ".UpdateIndexStateRequest\032\021.MetaDataRespo" + - "nse\0225\n\nclearCache\022\022.ClearCacheRequest\032\023." + - "ClearCacheResponse\0225\n\ngetVersion\022\022.GetVe" + - "rsionRequest\032\023.GetVersionResponse\022P\n\023cle" + - "arTableFromCache\022\033.ClearTableFromCacheRe" + - "quest\032\034.ClearTableFromCacheResponseBB\n(o" + - "rg.apache.phoenix.coprocessor.generatedB" + - "\016MetaDataProtosH\001\210\001\001\240\001\001" + "^\n\023DropFunctionRequest\022\036\n\026tableMetadataM" + + "utations\030\001 \003(\014\022\020\n\010ifExists\030\002 \001(\010\022\025\n\rclie" + + "ntVersion\030\003 \001(\005\"P\n\027UpdateIndexStateReque" + + "st\022\036\n\026tableMetadataMutations\030\001 \003(\014\022\025\n\rcl" + + "ientVersion\030\002 \001(\005\"*\n\021ClearCacheRequest\022\025", + "\n\rclientVersion\030\001 \001(\005\"*\n\022ClearCacheRespo" + + "nse\022\024\n\014unfreedBytes\030\001 \001(\003\"*\n\021GetVersionR" + + "equest\022\025\n\rclientVersion\030\001 \001(\005\"E\n\022GetVers" + + "ionResponse\022\017\n\007version\030\001 \002(\003\022\036\n\026systemCa" + + "talogTimestamp\030\002 \001(\003\"\205\001\n\032ClearTableFromC" + + "acheRequest\022\020\n\010tenantId\030\001 \002(\014\022\022\n\nschemaN" + + "ame\030\002 \002(\014\022\021\n\ttableName\030\003 \002(\014\022\027\n\017clientTi" + + "mestamp\030\004 \002(\003\022\025\n\rclientVersion\030\005 \001(\005\"\035\n\033" + + "ClearTableFromCacheResponse*\271\005\n\014Mutation" + + "Code\022\030\n\024TABLE_ALREADY_EXISTS\020\000\022\023\n\017TABLE_", + "NOT_FOUND\020\001\022\024\n\020COLUMN_NOT_FOUND\020\002\022\031\n\025COL" + + "UMN_ALREADY_EXISTS\020\003\022\035\n\031CONCURRENT_TABLE" + + "_MUTATION\020\004\022\027\n\023TABLE_NOT_IN_REGION\020\005\022\025\n\021" + + "NEWER_TABLE_FOUND\020\006\022\034\n\030UNALLOWED_TABLE_M" + + "UTATION\020\007\022\021\n\rNO_PK_COLUMNS\020\010\022\032\n\026PARENT_T" + + "ABLE_NOT_FOUND\020\t\022\033\n\027FUNCTION_ALREADY_EXI" + + "STS\020\n\022\026\n\022FUNCTION_NOT_FOUND\020\013\022\030\n\024NEWER_F" + + "UNCTION_FOUND\020\014\022\032\n\026FUNCTION_NOT_IN_REGIO" + + "N\020\r\022\031\n\025SCHEMA_ALREADY_EXISTS\020\016\022\026\n\022NEWER_" + + "SCHEMA_FOUND\020\017\022\024\n\020SCHEMA_NOT_FOUND\020\020\022\030\n\024", + "SCHEMA_NOT_IN_REGION\020\021\022\032\n\026TABLES_EXIST_O" + + "N_SCHEMA\020\022\022\035\n\031UNALLOWED_SCHEMA_MUTATION\020" + + "\023\022%\n!AUTO_PARTITION_SEQUENCE_NOT_FOUND\020\024" + + "\022#\n\037CANNOT_COERCE_AUTO_PARTITION_ID\020\025\022\024\n" + + "\020TOO_MANY_INDEXES\020\026\022\037\n\033UNABLE_TO_CREATE_" + + "CHILD_LINK\020\027\022!\n\035UNABLE_TO_UPDATE_PARENT_" + + "TABLE\020\0302\345\006\n\017MetaDataService\022/\n\010getTable\022" + + "\020.GetTableRequest\032\021.MetaDataResponse\0227\n\014" + + "getFunctions\022\024.GetFunctionsRequest\032\021.Met" + + "aDataResponse\0221\n\tgetSchema\022\021.GetSchemaRe", + "quest\032\021.MetaDataResponse\0225\n\013createTable\022" + + "\023.CreateTableRequest\032\021.MetaDataResponse\022" + + ";\n\016createFunction\022\026.CreateFunctionReques" + + "t\032\021.MetaDataResponse\0227\n\014createSchema\022\024.C" + + "reateSchemaRequest\032\021.MetaDataResponse\0221\n" + + "\tdropTable\022\021.DropTableRequest\032\021.MetaData" + + "Response\0223\n\ndropSchema\022\022.DropSchemaReque" + + "st\032\021.MetaDataResponse\0227\n\014dropFunction\022\024." + + "DropFunctionRequest\032\021.MetaDataResponse\0221" + + "\n\taddColumn\022\021.AddColumnRequest\032\021.MetaDat", + "aResponse\0223\n\ndropColumn\022\022.DropColumnRequ" + + "est\032\021.MetaDataResponse\022?\n\020updateIndexSta" + + "te\022\030.UpdateIndexStateRequest\032\021.MetaDataR" + + "esponse\0225\n\nclearCache\022\022.ClearCacheReques" + + "t\032\023.ClearCacheResponse\0225\n\ngetVersion\022\022.G" + + "etVersionRequest\032\023.GetVersionResponse\022P\n" + + "\023clearTableFromCache\022\033.ClearTableFromCac" + + "heRequest\032\034.ClearTableFromCacheResponseB" + + "B\n(org.apache.phoenix.coprocessor.genera" + + "tedB\016MetaDataProtosH\001\210\001\001\240\001\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -17937,13 +17937,13 @@ public final class MetaDataProtos { internal_static_SharedTableState_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_SharedTableState_descriptor, - new java.lang.String[] { "TenantId", "SchemaName", "TableName", "Columns", "PhysicalNames", "ViewIndexId", "ViewIndexType", }); + new java.lang.String[] { "TenantId", "SchemaName", "TableName", "Columns", "PhysicalNames", "ViewIndexId", "ViewIndexIdType", }); internal_static_MetaDataResponse_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_MetaDataResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_MetaDataResponse_descriptor, - new java.lang.String[] { "ReturnCode", "MutationTime", "Table", "TablesToDelete", "ColumnName", "FamilyName", "FunctionName", "Function", "SharedTablesToDelete", "Schema", "AutoPartitionNum", "ViewIndexId", "ViewIndexType", }); + new java.lang.String[] { "ReturnCode", "MutationTime", "Table", "TablesToDelete", "ColumnName", "FamilyName", "FunctionName", "Function", "SharedTablesToDelete", "Schema", "AutoPartitionNum", "ViewIndexId", "ViewIndexIdType", }); internal_static_GetTableRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_GetTableRequest_fieldAccessorTable = new