NIFI-2957 Corrections of typos, documentation, and strings

Updates made regarding Intellij code inspections

This closes #1218

Signed-off-by: Bryan Rosander <brosander@apache.org>
This commit is contained in:
Jeff Storck 2016-11-14 13:02:16 -05:00 committed by Bryan Rosander
parent ae4f27a627
commit 7e23734181
No known key found for this signature in database
GPG Key ID: 2065F38F3FF65D23
4 changed files with 16 additions and 16 deletions

View File

@ -48,8 +48,8 @@
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<!--<exclusions>-->
<!-- these exclusios can be used once the ZK dependency is upgraded to 3.5.2 or 3.6.0
which do not have the hard dependnecy on log4j -->
<!-- these exclusions can be used once the ZK dependency is upgraded to 3.5.2 or 3.6.0
which do not have the hard dependency on log4j -->
<!--<exclusion>-->
<!--<groupId>log4j</groupId>-->
<!--<artifactId>log4j</artifactId>-->
@ -69,6 +69,7 @@
<artifactId>gson</artifactId>
</dependency>
<dependency>
<!-- explicitly declaring for logback's runtime processing of logback.groovy -->
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</dependency>

View File

@ -25,7 +25,7 @@ import org.apache.zookeeper.data.Stat;
import java.util.List;
import java.util.Objects;
public class DataStatAclNode {
class DataStatAclNode {
private final String path;
private final byte[] data;
@ -33,7 +33,7 @@ public class DataStatAclNode {
private final List<ACL> acls;
private final long ephemeralOwner;
public DataStatAclNode(String path, byte[] data, Stat stat, List<ACL> acls, long ephemeralOwner) {
DataStatAclNode(String path, byte[] data, Stat stat, List<ACL> acls, long ephemeralOwner) {
this.path = Preconditions.checkNotNull(path, "path can not be null");
this.data = data;
this.stat = Preconditions.checkNotNull(stat, "stat can not be null");
@ -41,23 +41,23 @@ public class DataStatAclNode {
this.ephemeralOwner = ephemeralOwner;
}
public String getPath() {
String getPath() {
return path;
}
public byte[] getData() {
byte[] getData() {
return data;
}
public Stat getStat() {
Stat getStat() {
return stat;
}
public List<ACL> getAcls() {
List<ACL> getAcls() {
return acls;
}
public long getEphemeralOwner() {
long getEphemeralOwner() {
return ephemeralOwner;
}

View File

@ -41,7 +41,6 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import java.util.Spliterators;
@ -64,9 +63,9 @@ class ZooKeeperMigrator {
private final ZooKeeperEndpointConfig zooKeeperEndpointConfig;
ZooKeeperMigrator(String zookeeperEndpoint) throws URISyntaxException {
ZooKeeperMigrator(String zookeeperEndpoint) {
LOGGER.debug("ZooKeeper endpoint parameter: {}", zookeeperEndpoint);
Preconditions.checkArgument(!Strings.isNullOrEmpty(zookeeperEndpoint), "connectString must not be null");
Preconditions.checkArgument(!Strings.isNullOrEmpty(zookeeperEndpoint), "zookeeper endpoint must not be null");
final String[] connectStringPath = zookeeperEndpoint.split("/", 2);
Preconditions.checkArgument(connectStringPath.length >= 1, "invalid ZooKeeper endpoint: %s", zookeeperEndpoint);
final String connectString = connectStringPath[0];
@ -134,7 +133,7 @@ class ZooKeeperMigrator {
Preconditions.checkArgument(!Strings.isNullOrEmpty(sourceZooKeeperEndpointConfig.getConnectString()) && !Strings.isNullOrEmpty(sourceZooKeeperEndpointConfig.getPath()),
"Source ZooKeeper %s from %s is invalid", sourceZooKeeperEndpointConfig, zkData);
Preconditions.checkState(!zooKeeperEndpointConfig.equals(sourceZooKeeperEndpointConfig),
"Source ZooKeeper config %s for the data provided can not be the same as the configured destionation ZooKeeper config %s",
"Source ZooKeeper config %s for the data provided can not be the same as the configured destination ZooKeeper config %s",
sourceZooKeeperEndpointConfig, zooKeeperEndpointConfig);
// stream through each node read from the json input
@ -277,7 +276,7 @@ class ZooKeeperMigrator {
// set data without caring what the previous version of the data at that path
zooKeeper.setData(node.getPath(), node.getData(), -1);
zooKeeper.setACL(node.getPath(), node.getAcls(), -1);
LOGGER.info("transfered node {} in {}", node, zooKeeperEndpointConfig);
LOGGER.info("transferred node {} in {}", node, zooKeeperEndpointConfig);
} catch (Exception e) {
throw new RuntimeException(String.format("unable to transmit data to %s for path %s", zooKeeper, node.getPath()), e);
}

View File

@ -45,7 +45,7 @@ public class ZooKeeperMigratorMain {
.longOpt("zookeeper")
.desc("ZooKeeper connect string with path (ex. host:port/path)")
.hasArg()
.argName("connect-string")
.argName("zookeeper-endpoint")
.required()
.build();
private static final Option OPTION_RECEIVE = Option.builder("r")
@ -58,7 +58,7 @@ public class ZooKeeperMigratorMain {
.build();
private static final Option OPTION_ZK_AUTH_INFO = Option.builder("a")
.longOpt("auth")
.desc("username and password for the given ZK path")
.desc("username and password for the given ZooKeeper path")
.hasArg()
.argName("username:password")
.build();