This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fluo.git
The following commit(s) were added to refs/heads/master by this push:
new bcc80e1 Fixed some compiler warnings (#1048)
bcc80e1 is described below
commit bcc80e1b5e6540752fda2f8f73e99cf596f1c8b0
Author: Keith Turner <[email protected]>
AuthorDate: Fri Sep 7 16:58:00 2018 -0400
Fixed some compiler warnings (#1048)
---
.../org/apache/fluo/core/impl/SharedBatchWriter.java | 5 ++---
.../java/org/apache/fluo/core/impl/TimestampTracker.java | 12 ++++++------
.../java/org/apache/fluo/core/impl/TransactorCache.java | 5 ++---
.../java/org/apache/fluo/core/impl/TransactorNode.java | 16 ++++++++--------
.../java/org/apache/fluo/core/impl/VisibilityCache.java | 5 ++---
.../fluo/core/impl/scanner/ScannerBuilderImpl.java | 5 ++---
.../org/apache/fluo/core/log/TracingScannerBuilder.java | 5 ++---
.../main/java/org/apache/fluo/core/util/CuratorUtil.java | 5 ++---
.../fluo/core/worker/finder/hash/PartitionManager.java | 12 ++++++------
9 files changed, 32 insertions(+), 38 deletions(-)
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/impl/SharedBatchWriter.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/SharedBatchWriter.java
index 012f2d3..1f2d6bf 100644
---
a/modules/core/src/main/java/org/apache/fluo/core/impl/SharedBatchWriter.java
+++
b/modules/core/src/main/java/org/apache/fluo/core/impl/SharedBatchWriter.java
@@ -4,9 +4,9 @@
* 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
@@ -15,7 +15,6 @@
package org.apache.fluo.core.impl;
-import java.lang.Thread.UncaughtExceptionHandler;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/impl/TimestampTracker.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/TimestampTracker.java
index 7354d4e..7f5b78e 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/TimestampTracker.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/TimestampTracker.java
@@ -4,9 +4,9 @@
* 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
@@ -25,12 +25,12 @@ import java.util.TreeSet;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
-import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode;
-import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode.Mode;
+import org.apache.curator.framework.recipes.nodes.PersistentNode;
import org.apache.fluo.accumulo.util.LongUtil;
import org.apache.fluo.accumulo.util.ZookeeperPath;
import org.apache.fluo.core.oracle.Stamp;
import org.apache.fluo.core.util.CuratorUtil;
+import org.apache.zookeeper.CreateMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,7 +44,7 @@ public class TimestampTracker implements AutoCloseable {
private volatile long zkTimestamp = -1;
private final Environment env;
private final SortedSet<Long> timestamps = new TreeSet<>();
- private volatile PersistentEphemeralNode node = null;
+ private volatile PersistentNode node = null;
private final TransactorID tid;
private final Timer timer;
@@ -176,7 +176,7 @@ public class TimestampTracker implements AutoCloseable {
private void createZkNode(long ts) {
Preconditions.checkState(node == null, "expected node to be null");
- node = new PersistentEphemeralNode(env.getSharedResources().getCurator(),
Mode.EPHEMERAL,
+ node = new PersistentNode(env.getSharedResources().getCurator(),
CreateMode.EPHEMERAL, false,
getNodePath(), LongUtil.toByteArray(ts));
CuratorUtil.startAndWait(node, 10);
zkTimestamp = ts;
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/impl/TransactorCache.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/TransactorCache.java
index 17105a9..878b2f0 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/TransactorCache.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/TransactorCache.java
@@ -4,9 +4,9 @@
* 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
@@ -16,7 +16,6 @@
package org.apache.fluo.core.impl;
import java.io.IOException;
-import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/impl/TransactorNode.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/TransactorNode.java
index f04288d..0838e33 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/TransactorNode.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/TransactorNode.java
@@ -4,9 +4,9 @@
* 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
@@ -18,11 +18,11 @@ package org.apache.fluo.core.impl;
import java.io.IOException;
import com.google.common.annotations.VisibleForTesting;
-import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode;
-import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode.Mode;
+import org.apache.curator.framework.recipes.nodes.PersistentNode;
import org.apache.fluo.accumulo.util.LongUtil;
import org.apache.fluo.accumulo.util.ZookeeperPath;
import org.apache.fluo.core.util.CuratorUtil;
+import org.apache.zookeeper.CreateMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -38,20 +38,20 @@ public class TransactorNode implements AutoCloseable {
private static final Logger log =
LoggerFactory.getLogger(TransactorNode.class);
private Environment env;
- private PersistentEphemeralNode node;
+ private PersistentNode node;
private TransactorID tid;
private TrStatus status;
/**
* Creates a transactor node using given transactor id
- *
+ *
* @param env Environment
* @param tid Transactor ID used to create node
*/
public TransactorNode(Environment env, TransactorID tid) {
this.env = env;
this.tid = tid;
- node = new PersistentEphemeralNode(env.getSharedResources().getCurator(),
Mode.EPHEMERAL,
+ node = new PersistentNode(env.getSharedResources().getCurator(),
CreateMode.EPHEMERAL, false,
getNodePath(), tid.toString().getBytes());
CuratorUtil.startAndWait(node, 10);
status = TrStatus.OPEN;
@@ -59,7 +59,7 @@ public class TransactorNode implements AutoCloseable {
/**
* Creates a transactor node using new transactor ID
- *
+ *
* @param env Environment
*/
public TransactorNode(Environment env) {
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/impl/VisibilityCache.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/VisibilityCache.java
index 8cbcde3..f93f731 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/VisibilityCache.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/VisibilityCache.java
@@ -4,9 +4,9 @@
* 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
@@ -16,7 +16,6 @@
package org.apache.fluo.core.impl;
import java.util.Set;
-import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ScannerBuilderImpl.java
b/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ScannerBuilderImpl.java
index b6f4c6f..420fb73 100644
---
a/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ScannerBuilderImpl.java
+++
b/modules/core/src/main/java/org/apache/fluo/core/impl/scanner/ScannerBuilderImpl.java
@@ -4,9 +4,9 @@
* 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
@@ -22,7 +22,6 @@ import java.util.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import org.apache.fluo.api.client.scanner.CellScanner;
-import org.apache.fluo.api.client.scanner.RowScanner;
import org.apache.fluo.api.client.scanner.RowScannerBuilder;
import org.apache.fluo.api.client.scanner.ScannerBuilder;
import org.apache.fluo.api.data.Column;
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/log/TracingScannerBuilder.java
b/modules/core/src/main/java/org/apache/fluo/core/log/TracingScannerBuilder.java
index e0a9d8a..ad1cc0c 100644
---
a/modules/core/src/main/java/org/apache/fluo/core/log/TracingScannerBuilder.java
+++
b/modules/core/src/main/java/org/apache/fluo/core/log/TracingScannerBuilder.java
@@ -4,9 +4,9 @@
* 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
@@ -21,7 +21,6 @@ import java.util.Objects;
import com.google.common.collect.ImmutableSet;
import org.apache.fluo.api.client.scanner.CellScanner;
-import org.apache.fluo.api.client.scanner.RowScanner;
import org.apache.fluo.api.client.scanner.RowScannerBuilder;
import org.apache.fluo.api.client.scanner.ScannerBuilder;
import org.apache.fluo.api.config.FluoConfiguration;
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/util/CuratorUtil.java
b/modules/core/src/main/java/org/apache/fluo/core/util/CuratorUtil.java
index ffaad60..07db1b8 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/util/CuratorUtil.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/util/CuratorUtil.java
@@ -25,8 +25,7 @@ import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.framework.api.ACLProvider;
import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.NodeCache;
-import org.apache.curator.framework.recipes.cache.NodeCacheListener;
-import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode;
+import org.apache.curator.framework.recipes.nodes.PersistentNode;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.fluo.accumulo.util.ZookeeperPath;
import org.apache.fluo.accumulo.util.ZookeeperUtil;
@@ -161,7 +160,7 @@ public class CuratorUtil {
* @param node Node to start
* @param maxWaitSec Maximum time in seconds to wait
*/
- public static void startAndWait(PersistentEphemeralNode node, int
maxWaitSec) {
+ public static void startAndWait(PersistentNode node, int maxWaitSec) {
node.start();
int waitTime = 0;
try {
diff --git
a/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/PartitionManager.java
b/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/PartitionManager.java
index 89647f6..e106d08 100644
---
a/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/PartitionManager.java
+++
b/modules/core/src/main/java/org/apache/fluo/core/worker/finder/hash/PartitionManager.java
@@ -4,9 +4,9 @@
* 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
@@ -38,8 +38,7 @@ import
org.apache.curator.framework.recipes.cache.PathChildrenCache;
import org.apache.curator.framework.recipes.cache.PathChildrenCache.StartMode;
import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent;
import org.apache.curator.framework.recipes.cache.PathChildrenCacheListener;
-import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode;
-import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode.Mode;
+import org.apache.curator.framework.recipes.nodes.PersistentNode;
import org.apache.curator.utils.ZKPaths;
import org.apache.fluo.accumulo.iterators.NotificationHashFilter;
import org.apache.fluo.accumulo.util.NotificationUtil;
@@ -50,6 +49,7 @@ import org.apache.fluo.core.impl.FluoConfigurationImpl;
import org.apache.fluo.core.impl.Notification;
import org.apache.fluo.core.util.ByteUtil;
import org.apache.fluo.core.util.FluoThreadFactory;
+import org.apache.zookeeper.CreateMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -74,7 +74,7 @@ public class PartitionManager {
public static final String ZK_FINDER_PREFIX = "f-";
private final PathChildrenCache childrenCache;
- private final PersistentEphemeralNode myESNode;
+ private final PersistentNode myESNode;
private final int groupSize;
private long paritionSetTime;
private PartitionInfo partitionInfo;
@@ -279,7 +279,7 @@ public class PartitionManager {
groupSize =
env.getConfiguration().getInt(FluoConfigurationImpl.WORKER_PARTITION_GROUP_SIZE,
FluoConfigurationImpl.WORKER_PARTITION_GROUP_SIZE_DEFAULT);
- myESNode = new PersistentEphemeralNode(curator,
Mode.EPHEMERAL_SEQUENTIAL,
+ myESNode = new PersistentNode(curator, CreateMode.EPHEMERAL_SEQUENTIAL,
false,
ZookeeperPath.FINDERS + "/" + ZK_FINDER_PREFIX, ("" +
groupSize).getBytes(UTF_8));
myESNode.start();
myESNode.waitForInitialCreate(1, TimeUnit.MINUTES);