[ 
https://issues.apache.org/jira/browse/PHOENIX-4855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16598303#comment-16598303
 ] 

Hadoop QA commented on PHOENIX-4855:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12937843/PHOENIX-4855-4.x-HBase-1.3.patch
  against 4.x-HBase-1.3 branch at commit 
fa20ff297ed2de19b6e736b39c73521045160115.
  ATTACHMENT ID: 12937843

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
                        Please justify why no new tests are needed for this 
patch.
                        Also please list what manual steps were performed to 
verify this patch.

    {color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:red}-1 release audit{color}.  The applied patch generated 2 release 
audit warnings (more than the master's current 0 warnings).

    {color:red}-1 lineLengths{color}.  The patch introduces the following lines 
longer than 100:
    +                            + "V2 VARCHAR, V3 VARCHAR CONSTRAINT NAME_PK 
PRIMARY KEY(TENANT_ID, PK1))"
+            assertTableDefinition(conn, baseTable, PTableType.TABLE, null, 1, 
6, BASE_TABLE_BASE_COLUMN_COUNT, "TENANT_ID", "PK1", "V1", "V2", "V3");
+            assertTableDefinition(tenant1Conn, view1, PTableType.VIEW, 
baseTable, 0, 8, 6,  "PK1", "V1", "V2", "V3", "VIEW_COL1", "VIEW_COL2");
+            assertTableDefinition(tenant1Conn, view1, PTableType.VIEW, 
baseTable, 0, 8, 6,  "PK1", "V1", "V2", "V3", "KV", "PK2", "VIEW_COL1", 
"VIEW_COL2");
+                            + " (TENANT_ID VARCHAR NOT NULL, PK1 VARCHAR NOT 
NULL, V1 VARCHAR, V2 VARCHAR,"
+            assertTableDefinition(conn, baseTable, PTableType.TABLE, null, 1, 
6, BASE_TABLE_BASE_COLUMN_COUNT, "TENANT_ID", "PK1", "V1", "V2", "V3");
+            assertTableDefinition(tenant1Conn, view1, PTableType.VIEW, 
baseTable, 0, 8, 6, "PK1", "V1", "V2", "V3", "VIEW_COL1", "VIEW_COL2");
+            assertTableDefinition(tenant1Conn, view1, PTableType.VIEW, 
baseTable, 0, 8, 6, "PK1", "V1",  "V3", "VIEW_COL1", "VIEW_COL2");
+            assertTableDefinition(conn, tableName, PTableType.TABLE, null, 0, 
3, QueryConstants.BASE_TABLE_BASE_COLUMN_COUNT, true, "ID", "COL1", "COL2");
+            assertTableDefinition(viewConn, viewOfTable, PTableType.VIEW, 
tableName, 0, 5, 3, true, "ID", "COL1", "COL2", "VIEW_COL1", "VIEW_COL2");

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
     
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.ViewIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.KeyOnlyIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.rpc.PhoenixServerRpcIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.LocalIndexSplitMergeIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.TenantSpecificTablesDDLIT
./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.StatsEnabledSplitSystemCatalogIT

Test results: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/2013//testReport/
Release audit warnings: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/2013//artifact/patchprocess/patchReleaseAuditWarnings.txt
Console output: 
https://builds.apache.org/job/PreCommit-PHOENIX-Build/2013//console

This message is automatically generated.

> Continue to write base table column metadata when creating a view in order to 
> support rollback
> ----------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4855
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4855
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Thomas D'Silva
>            Assignee: Thomas D'Silva
>            Priority: Major
>         Attachments: PHOENIX-4855-4.x-HBase-1.3.patch
>
>
> Currently we filter out the parent table columns while creating a view. If we 
> have to support rollback we still need to write the parent table column 
> metadata. 
> Instead of this we should filter out the duplicate columns in 
> {{MetaDataEndpointImpl.combineColumns}}
> {code}
> // Here we are passed the parent's columns to add to a view, PHOENIX-3534 
> allows for a splittable
>             // System.Catalog thus we only store the columns that are new to 
> the view, not the parents columns,
>             // thus here we remove everything that is ORDINAL.POSITION <= 
> baseColumnCount and update the
>             // ORDINAL.POSITIONS to be shifted accordingly.
>             // TODO PHOENIX-4767 remove the following code that removes the 
> base table column metadata in the next release 
>             if (PTableType.VIEW.equals(tableType) && 
> !ViewType.MAPPED.equals(viewType)) {
>                 boolean isSalted = MetaDataUtil.getSaltBuckets(tableMetadata, 
> GenericKeyValueBuilder.INSTANCE, new ImmutableBytesWritable()) > 0;
>                 int baseColumnCount = 
> MetaDataUtil.getBaseColumnCount(tableMetadata) - (isSalted ? 1 : 0);
>                 if (baseColumnCount > 0) {
>                     Iterator<Mutation> mutationIterator = 
> tableMetadata.iterator();
>                     while (mutationIterator.hasNext()) {
>                         Mutation mutation = mutationIterator.next();
>                         // if not null and ordinal position < base column 
> count remove this mutation
>                         ImmutableBytesWritable ptr = new 
> ImmutableBytesWritable();
>                         MetaDataUtil.getMutationValue(mutation, 
> PhoenixDatabaseMetaData.ORDINAL_POSITION_BYTES,
>                             GenericKeyValueBuilder.INSTANCE, ptr);
>                         if (MetaDataUtil.getMutationValue(mutation, 
> PhoenixDatabaseMetaData.ORDINAL_POSITION_BYTES,
>                             GenericKeyValueBuilder.INSTANCE, ptr)) {
>                             int ordinalValue = 
> PInteger.INSTANCE.getCodec().decodeInt(ptr, SortOrder.ASC);
>                             if (ordinalValue <= baseColumnCount) {
>                                 mutationIterator.remove();
>                             } else {
>                                 if (mutation instanceof Put) {
>                                     byte[] ordinalPositionBytes = new 
> byte[PInteger.INSTANCE.getByteSize()];
>                                     int newOrdinalValue = ordinalValue - 
> baseColumnCount;
>                                     PInteger.INSTANCE.getCodec()
>                                         .encodeInt(newOrdinalValue, 
> ordinalPositionBytes, 0);
>                                     byte[] family = 
> Iterables.getOnlyElement(mutation.getFamilyCellMap().keySet());
>                                     MetaDataUtil.mutatePutValue((Put) 
> mutation, family, PhoenixDatabaseMetaData.ORDINAL_POSITION_BYTES, 
> ordinalPositionBytes);
>                                 }
>                             }
>                         }
>                     }
>                 }
>             }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to