phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kadir OZDEMIR (Jira)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-5792) TestUtil.doMajorCompaction() uses incorrect empty column family and qualifier
Date Sun, 22 Mar 2020 21:24:00 GMT
Kadir OZDEMIR created PHOENIX-5792:
--------------------------------------

             Summary: TestUtil.doMajorCompaction() uses incorrect empty column family and
qualifier
                 Key: PHOENIX-5792
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5792
             Project: Phoenix
          Issue Type: Bug
            Reporter: Kadir OZDEMIR


It should corrected as follows:

--- a/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/util/TestUtil.java
@@ -823,10 +823,15 @@ public class TestUtil {
 byte[] markerRowKey = Bytes.toBytes("TO_DELETE");
 
 Put put = new Put(markerRowKey);
- put.addColumn(QueryConstants.DEFAULT_COLUMN_FAMILY_BYTES, QueryConstants.EMPTY_COLUMN_VALUE_BYTES,
QueryConstants.EMPTY_COLUMN_VALUE_BYTES);
+ byte[] emptyColumnFamilyName = SchemaUtil.getEmptyColumnFamily(table);
+ byte[] emptyColumnName =
+ table.getEncodingScheme() == PTable.QualifierEncodingScheme.NON_ENCODED_QUALIFIERS ?
+ QueryConstants.EMPTY_COLUMN_BYTES :
+ table.getEncodingScheme().encode(QueryConstants.ENCODED_EMPTY_COLUMN_NAME);
+ put.addColumn(emptyColumnFamilyName, emptyColumnName, QueryConstants.EMPTY_COLUMN_VALUE_BYTES);
 htable.put(put);
 Delete delete = new Delete(markerRowKey);
- delete.addColumn(QueryConstants.DEFAULT_COLUMN_FAMILY_BYTES, QueryConstants.EMPTY_COLUMN_VALUE_BYTES);
+ delete.addColumn(emptyColumnFamilyName, emptyColumnName);
 htable.delete(delete);
 htable.close();
 if (table.isTransactional()) {



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message