This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
     new dcfb257077 PHOENIX-6710 Revert PHOENIX-3842 Turn on back default 
bloomFilter for Phoenix Tables (#1436)
dcfb257077 is described below

commit dcfb257077d0161f532dfe9ca793fc076be29eee
Author: Ankit Singhal <an...@apache.org>
AuthorDate: Tue May 10 20:56:00 2022 -0700

    PHOENIX-6710 Revert PHOENIX-3842 Turn on back default bloomFilter for 
Phoenix Tables (#1436)
---
 .../src/it/java/org/apache/phoenix/end2end/CreateTableIT.java       | 6 +++---
 .../java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java  | 4 +---
 .../org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java   | 6 ++++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
index fd48e5fb68..53db200d63 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
@@ -264,7 +264,7 @@ public class CreateTableIT extends ParallelStatsDisabledIT {
         assertNotNull(admin.getDescriptor(TableName.valueOf(tableName)));
         ColumnFamilyDescriptor[] columnFamilies =
                 
admin.getDescriptor(TableName.valueOf(tableName)).getColumnFamilies();
-        assertEquals(BloomType.NONE, columnFamilies[0].getBloomFilterType());
+        assertEquals(BloomType.ROW, columnFamilies[0].getBloomFilterType());
 
         try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
             conn.createStatement().execute(ddl);
@@ -527,14 +527,14 @@ public class CreateTableIT extends 
ParallelStatsDisabledIT {
                 "create table IF NOT EXISTS  " + tableName + "  (" + " id 
char(1) NOT NULL,"
                         + " col1 integer NOT NULL," + " col2 bigint NOT NULL,"
                         + " CONSTRAINT NAME_PK PRIMARY KEY (id, col1, col2)"
-                        + " ) BLOOMFILTER = 'ROW', SALT_BUCKETS = 4";
+                        + " ) BLOOMFILTER = 'NONE', SALT_BUCKETS = 4";
         Properties props = new Properties();
         Connection conn = DriverManager.getConnection(getUrl(), props);
         conn.createStatement().execute(ddl);
         Admin admin = driver.getConnectionQueryServices(getUrl(), 
props).getAdmin();
         ColumnFamilyDescriptor[] columnFamilies =
                 
admin.getDescriptor(TableName.valueOf(tableName)).getColumnFamilies();
-        assertEquals(BloomType.ROW, columnFamilies[0].getBloomFilterType());
+        assertEquals(BloomType.NONE, columnFamilies[0].getBloomFilterType());
     }
 
     /**
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 202bad9148..68fe9bda71 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -149,7 +149,6 @@ import 
org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils.BlockingRpcCallback;
 import org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory;
 import org.apache.hadoop.hbase.ipc.ServerRpcController;
 import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MutationProto;
-import org.apache.hadoop.hbase.regionserver.BloomType;
 import org.apache.hadoop.hbase.regionserver.IndexHalfStoreFileReaderGenerator;
 import org.apache.hadoop.hbase.security.AccessDeniedException;
 import org.apache.hadoop.hbase.security.User;
@@ -844,7 +843,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
         ColumnFamilyDescriptorBuilder columnDescBuilder = 
ColumnFamilyDescriptorBuilder.newBuilder(family.getFirst());
         if (tableType != PTableType.VIEW) {
             
columnDescBuilder.setDataBlockEncoding(SchemaUtil.DEFAULT_DATA_BLOCK_ENCODING);
-            columnDescBuilder.setBloomFilterType(BloomType.NONE);
             for (Entry<String,Object> entry : family.getSecond().entrySet()) {
                 String key = entry.getKey();
                 Object value = entry.getValue();
@@ -4323,7 +4321,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
         } catch (TableAlreadyExistsException e) {
             // take snapshot first
             takeSnapshotOfSysTable(systemTableToSnapshotMap, e);
-            if(UpgradeUtil.tableHasKeepDeleted(
+            if (UpgradeUtil.tableHasKeepDeleted(
                 metaConnection, PhoenixDatabaseMetaData.SYSTEM_LOG_NAME) ) {
                 try (Statement stmt = metaConnection.createStatement()) {
                     stmt.executeUpdate("ALTER TABLE " +
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java
index 4db7075776..722b7a1799 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java
@@ -314,8 +314,10 @@ public class SchemaExtractionProcessor implements 
SchemaProcessor {
             String key = entry.getKey();
             String value = entry.getValue();
             defaultProps.put(key, value);
-            if(key.equalsIgnoreCase(HColumnDescriptor.BLOOMFILTER) || 
key.equalsIgnoreCase(
-                    HColumnDescriptor.COMPRESSION)) {
+            if (key.equalsIgnoreCase(HColumnDescriptor.BLOOMFILTER)) {
+                defaultProps.put(key, "ROW");
+            }
+            if (key.equalsIgnoreCase(HColumnDescriptor.COMPRESSION)) {
                 defaultProps.put(key, "NONE");
             }
             if(key.equalsIgnoreCase(HColumnDescriptor.DATA_BLOCK_ENCODING)) {

Reply via email to