You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/07/23 18:39:31 UTC
git commit: ACCUMULO-1585 remove AddressUtil from server
Updated Branches:
refs/heads/master 14a8dec15 -> 3ed42c231
ACCUMULO-1585 remove AddressUtil from server
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3ed42c23
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3ed42c23
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3ed42c23
Branch: refs/heads/master
Commit: 3ed42c231927c467a8536ff0c4e094d652588a9c
Parents: 14a8dec
Author: Eric Newton <ec...@apache.org>
Authored: Tue Jul 23 12:39:42 2013 -0400
Committer: Eric Newton <ec...@apache.org>
Committed: Tue Jul 23 12:39:42 2013 -0400
----------------------------------------------------------------------
.../server/gc/GarbageCollectWriteAheadLogs.java | 2 +-
.../accumulo/server/master/LiveTServerSet.java | 2 +-
.../apache/accumulo/server/master/Master.java | 4 +--
.../server/master/state/TServerInstance.java | 7 ++---
.../master/state/TabletStateChangeIterator.java | 2 +-
.../server/monitor/servlets/MasterServlet.java | 2 +-
.../accumulo/server/trace/TraceServer.java | 1 -
.../accumulo/server/util/AddressUtil.java | 33 --------------------
.../org/apache/accumulo/server/util/Admin.java | 1 +
.../randomwalk/concurrent/StopTabletServer.java | 2 +-
10 files changed, 10 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java b/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
index 9bf7bf6..d6738fe 100644
--- a/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
+++ b/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
@@ -36,12 +36,12 @@ import org.apache.accumulo.core.gc.thrift.GCStatus;
import org.apache.accumulo.core.gc.thrift.GcCycleStats;
import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Client;
+import org.apache.accumulo.core.util.AddressUtil;
import org.apache.accumulo.core.util.ThriftUtil;
import org.apache.accumulo.core.zookeeper.ZooUtil;
import org.apache.accumulo.server.ServerConstants;
import org.apache.accumulo.server.fs.VolumeManager;
import org.apache.accumulo.server.security.SystemCredentials;
-import org.apache.accumulo.server.util.AddressUtil;
import org.apache.accumulo.server.util.MetadataTableUtil;
import org.apache.accumulo.server.util.MetadataTableUtil.LogEntry;
import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java b/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
index 3cb73b6..8c654fb 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
@@ -34,12 +34,12 @@ import org.apache.accumulo.core.data.KeyExtent;
import org.apache.accumulo.core.master.thrift.TabletServerStatus;
import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
+import org.apache.accumulo.core.util.AddressUtil;
import org.apache.accumulo.core.util.ServerServices;
import org.apache.accumulo.core.util.ThriftUtil;
import org.apache.accumulo.core.zookeeper.ZooUtil;
import org.apache.accumulo.server.master.state.TServerInstance;
import org.apache.accumulo.server.security.SystemCredentials;
-import org.apache.accumulo.server.util.AddressUtil;
import org.apache.accumulo.server.util.Halt;
import org.apache.accumulo.server.util.time.SimpleTimer;
import org.apache.accumulo.server.zookeeper.ZooCache;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/master/Master.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/Master.java b/server/src/main/java/org/apache/accumulo/server/master/Master.java
index bb7fa62..e15202b 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/Master.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/Master.java
@@ -17,7 +17,6 @@
package org.apache.accumulo.server.master;
import java.io.IOException;
-import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collection;
@@ -89,8 +88,8 @@ import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
import org.apache.accumulo.server.Accumulo;
-import org.apache.accumulo.server.ServerOpts;
import org.apache.accumulo.server.ServerConstants;
+import org.apache.accumulo.server.ServerOpts;
import org.apache.accumulo.server.client.HdfsZooInstance;
import org.apache.accumulo.server.conf.ServerConfiguration;
import org.apache.accumulo.server.fs.VolumeManager;
@@ -132,7 +131,6 @@ import org.apache.accumulo.server.monitor.Monitor;
import org.apache.accumulo.server.security.AuditedSecurityOperation;
import org.apache.accumulo.server.security.SecurityOperation;
import org.apache.accumulo.server.security.SystemCredentials;
-import org.apache.accumulo.server.util.AddressUtil;
import org.apache.accumulo.server.util.DefaultMap;
import org.apache.accumulo.server.util.Halt;
import org.apache.accumulo.server.util.MetadataTableUtil;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java b/server/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
index ab3d69f..753a3cf 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/state/TServerInstance.java
@@ -19,11 +19,10 @@ package org.apache.accumulo.server.master.state;
import java.io.Serializable;
import java.net.InetSocketAddress;
-import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
-import org.apache.accumulo.server.util.AddressUtil;
+import org.apache.accumulo.core.util.AddressUtil;
import org.apache.hadoop.io.Text;
/**
@@ -50,11 +49,11 @@ public class TServerInstance implements Comparable<TServerInstance>, Serializabl
}
public TServerInstance(String address, long session) {
- this(AddressUtil.parseAddress(address, Property.TSERV_CLIENTPORT), Long.toHexString(session));
+ this(AddressUtil.parseAddress(address), Long.toHexString(session));
}
public TServerInstance(Value address, Text session) {
- this(AddressUtil.parseAddress(new String(address.get()), Property.TSERV_CLIENTPORT), session.toString());
+ this(AddressUtil.parseAddress(new String(address.get())), session.toString());
}
public void putLocation(Mutation m) {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java b/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
index 67ba62a..ddcdeea 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
@@ -33,9 +33,9 @@ import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.IteratorEnvironment;
import org.apache.accumulo.core.iterators.SkippingIterator;
import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
+import org.apache.accumulo.core.util.AddressUtil;
import org.apache.accumulo.core.util.StringUtil;
import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
-import org.apache.accumulo.server.util.AddressUtil;
import org.apache.commons.codec.binary.Base64;
import org.apache.hadoop.io.DataInputBuffer;
import org.apache.hadoop.io.DataOutputBuffer;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java b/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
index a673b64..9c0f6f3 100644
--- a/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
+++ b/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
@@ -34,6 +34,7 @@ import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
import org.apache.accumulo.core.master.thrift.MasterState;
import org.apache.accumulo.core.master.thrift.RecoveryStatus;
import org.apache.accumulo.core.master.thrift.TabletServerStatus;
+import org.apache.accumulo.core.util.AddressUtil;
import org.apache.accumulo.core.util.StringUtil;
import org.apache.accumulo.server.client.HdfsZooInstance;
import org.apache.accumulo.server.monitor.DedupedLogEvent;
@@ -45,7 +46,6 @@ import org.apache.accumulo.server.monitor.util.celltypes.DurationType;
import org.apache.accumulo.server.monitor.util.celltypes.NumberType;
import org.apache.accumulo.server.monitor.util.celltypes.ProgressChartType;
import org.apache.accumulo.server.monitor.util.celltypes.StringType;
-import org.apache.accumulo.server.util.AddressUtil;
import org.apache.log4j.Level;
public class MasterServlet extends BasicServlet {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java b/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
index 27624e3..520f812 100644
--- a/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
@@ -40,7 +40,6 @@ import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.user.AgeOffFilter;
import org.apache.accumulo.core.security.SecurityUtil;
import org.apache.accumulo.core.trace.TraceFormatter;
-import org.apache.accumulo.core.util.AddressUtil;
import org.apache.accumulo.core.util.UtilWaitThread;
import org.apache.accumulo.core.zookeeper.ZooUtil;
import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java b/server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java
deleted file mode 100644
index 1ca5afd..0000000
--- a/server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.accumulo.server.util;
-
-import java.net.InetSocketAddress;
-
-import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.server.conf.ServerConfiguration;
-
-public class AddressUtil {
- static public InetSocketAddress parseAddress(String address, Property portDefaultProperty) {
- final int dfaultPort = ServerConfiguration.getDefaultConfiguration().getPort(portDefaultProperty);
- return org.apache.accumulo.core.util.AddressUtil.parseAddress(address, dfaultPort);
- }
-
- static public InetSocketAddress parseAddress(String address) {
- return org.apache.accumulo.core.util.AddressUtil.parseAddress(address);
- }
-}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/server/src/main/java/org/apache/accumulo/server/util/Admin.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/Admin.java b/server/src/main/java/org/apache/accumulo/server/util/Admin.java
index 215b9c7..f51543d 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/Admin.java
@@ -34,6 +34,7 @@ import org.apache.accumulo.core.master.thrift.MasterClientService;
import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.security.CredentialHelper;
import org.apache.accumulo.core.security.thrift.TCredentials;
+import org.apache.accumulo.core.util.AddressUtil;
import org.apache.accumulo.server.cli.ClientOpts;
import org.apache.accumulo.server.client.HdfsZooInstance;
import org.apache.accumulo.server.security.SystemCredentials;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3ed42c23/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java
index 4bffee8..337d318 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java
@@ -25,10 +25,10 @@ import java.util.Set;
import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.util.AddressUtil;
import org.apache.accumulo.core.zookeeper.ZooUtil;
import org.apache.accumulo.fate.zookeeper.ZooReader;
import org.apache.accumulo.server.master.state.TServerInstance;
-import org.apache.accumulo.server.util.AddressUtil;
import org.apache.accumulo.test.randomwalk.State;
import org.apache.accumulo.test.randomwalk.Test;
import org.apache.zookeeper.KeeperException;