You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by td...@apache.org on 2015/12/01 06:58:33 UTC
[1/3] phoenix git commit: PHOENIX-2465 Upgrade ANTLR version to
correct generation (Gabor Liptak)
Repository: phoenix
Updated Branches:
refs/heads/4.x-HBase-1.0 7a4a7b05d -> 3f25511fc
PHOENIX-2465 Upgrade ANTLR version to correct generation (Gabor Liptak)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d2d14107
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d2d14107
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d2d14107
Branch: refs/heads/4.x-HBase-1.0
Commit: d2d14107515e6e892a451c8fdb9424610e06b425
Parents: 7a4a7b0
Author: James Taylor <jt...@salesforce.com>
Authored: Mon Nov 30 14:10:34 2015 -0800
Committer: Thomas D'Silva <td...@salesforce.com>
Committed: Mon Nov 30 21:57:37 2015 -0800
----------------------------------------------------------------------
phoenix-core/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/d2d14107/phoenix-core/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 8f5895e..e96ff9d 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -112,7 +112,7 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
- <version>3.5</version>
+ <version>3.5.2</version>
<executions>
<execution>
<goals>
[3/3] phoenix git commit: PHOENIX-2374 Honor PTable.isWALDisabled()
for row deletes
Posted by td...@apache.org.
PHOENIX-2374 Honor PTable.isWALDisabled() for row deletes
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/3f25511f
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/3f25511f
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/3f25511f
Branch: refs/heads/4.x-HBase-1.0
Commit: 3f25511fce4d55422fb162a95ff56dd114dc9e0e
Parents: 930907a
Author: James Taylor <jt...@salesforce.com>
Authored: Mon Nov 30 20:07:43 2015 -0800
Committer: Thomas D'Silva <td...@salesforce.com>
Committed: Mon Nov 30 21:57:54 2015 -0800
----------------------------------------------------------------------
.../org/apache/phoenix/schema/PTableImpl.java | 17 +++--
.../org/apache/phoenix/schema/MutationTest.java | 74 ++++++++++++++++++++
2 files changed, 84 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/3f25511f/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
index 0827ea7..1805d94 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
@@ -697,12 +697,15 @@ public class PTableImpl implements PTable {
newMutations();
}
- @SuppressWarnings("deprecation")
private void newMutations() {
- this.setValues = new Put(this.key);
- this.unsetValues = new Delete(this.key);
- this.setValues.setWriteToWAL(!isWALDisabled());
- this.unsetValues.setWriteToWAL(!isWALDisabled());
+ Put put = new Put(this.key);
+ Delete delete = new Delete(this.key);
+ if (isWALDisabled()) {
+ put.setDurability(Durability.SKIP_WAL);
+ delete.setDurability(Durability.SKIP_WAL);
+ }
+ this.setValues = put;
+ this.unsetValues = delete;
}
@Override
@@ -781,6 +784,7 @@ public class PTableImpl implements PTable {
}
}
+ @SuppressWarnings("deprecation")
@Override
public void delete() {
newMutations();
@@ -800,8 +804,7 @@ public class PTableImpl implements PTable {
}
deleteRow = delete;
}
- // No need to write to the WAL for indexes
- if (PTableImpl.this.getType() == PTableType.INDEX) {
+ if (isWALDisabled()) {
deleteRow.setDurability(Durability.SKIP_WAL);
}
}
http://git-wip-us.apache.org/repos/asf/phoenix/blob/3f25511f/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java b/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java
new file mode 100644
index 0000000..ccbda54
--- /dev/null
+++ b/phoenix-core/src/test/java/org/apache/phoenix/schema/MutationTest.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.schema;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.hadoop.hbase.client.Durability;
+import org.apache.hadoop.hbase.client.Mutation;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.query.BaseConnectionlessQueryTest;
+import org.junit.Test;
+
+public class MutationTest extends BaseConnectionlessQueryTest {
+ @Test
+ public void testDurability() throws Exception {
+ testDurability(true);
+ testDurability(false);
+ }
+
+ private void testDurability(boolean disableWAL) throws Exception {
+ Connection conn = DriverManager.getConnection(getUrl());
+ try {
+ Durability expectedDurability = disableWAL ? Durability.SKIP_WAL : Durability.USE_DEFAULT;
+ conn.setAutoCommit(false);
+ conn.createStatement().execute("CREATE TABLE t1 (k integer not null primary key, a.k varchar, b.k varchar) " + (disableWAL ? "DISABLE_WAL=true" : ""));
+ conn.createStatement().execute("UPSERT INTO t1 VALUES(1,'a','b')");
+ conn.createStatement().execute("DELETE FROM t1 WHERE k=2");
+ assertDurability(conn,expectedDurability);
+ conn.createStatement().execute("DELETE FROM t1 WHERE k=1");
+ assertDurability(conn,expectedDurability);
+ conn.createStatement().execute("DROP TABLE t1");
+ } finally {
+ conn.close();
+ }
+ }
+
+ private void assertDurability(Connection conn, Durability durability) throws SQLException {
+ PhoenixConnection pconn = conn.unwrap(PhoenixConnection.class);
+ Iterator<Pair<byte[], List<Mutation>>> it = pconn.getMutationState().toMutations();
+ assertTrue(it.hasNext());
+ while (it.hasNext()) {
+ Pair<byte[], List<Mutation>> pair = it.next();
+ assertFalse(pair.getSecond().isEmpty());
+ for (Mutation m : pair.getSecond()) {
+ assertEquals(durability, m.getDurability());
+ }
+ }
+ }
+
+}
[2/3] phoenix git commit: PHOENIX-2466 Correct warning on
maven-dependency-plugin in phoenix-core (Gabor Liptak)
Posted by td...@apache.org.
PHOENIX-2466 Correct warning on maven-dependency-plugin in phoenix-core (Gabor Liptak)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/930907a4
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/930907a4
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/930907a4
Branch: refs/heads/4.x-HBase-1.0
Commit: 930907a4bb665e82ceed1c6ae8ad28f46874170d
Parents: d2d1410
Author: James Taylor <jt...@salesforce.com>
Authored: Mon Nov 30 14:21:16 2015 -0800
Committer: Thomas D'Silva <td...@salesforce.com>
Committed: Mon Nov 30 21:57:47 2015 -0800
----------------------------------------------------------------------
phoenix-core/pom.xml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/930907a4/phoenix-core/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index e96ff9d..f504a8f 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -202,11 +202,9 @@
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
- </plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<!-- generates the file that will be used by the sandbox script in the dev env -->