mirror of https://github.com/apache/nifi.git
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:
parent
ae4f27a627
commit
7e23734181
|
@ -48,8 +48,8 @@
|
||||||
<groupId>org.apache.zookeeper</groupId>
|
<groupId>org.apache.zookeeper</groupId>
|
||||||
<artifactId>zookeeper</artifactId>
|
<artifactId>zookeeper</artifactId>
|
||||||
<!--<exclusions>-->
|
<!--<exclusions>-->
|
||||||
<!-- these exclusios can be used once the ZK dependency is upgraded to 3.5.2 or 3.6.0
|
<!-- 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 dependnecy on log4j -->
|
which do not have the hard dependency on log4j -->
|
||||||
<!--<exclusion>-->
|
<!--<exclusion>-->
|
||||||
<!--<groupId>log4j</groupId>-->
|
<!--<groupId>log4j</groupId>-->
|
||||||
<!--<artifactId>log4j</artifactId>-->
|
<!--<artifactId>log4j</artifactId>-->
|
||||||
|
@ -69,6 +69,7 @@
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
<!-- explicitly declaring for logback's runtime processing of logback.groovy -->
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
<artifactId>groovy-all</artifactId>
|
<artifactId>groovy-all</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.zookeeper.data.Stat;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class DataStatAclNode {
|
class DataStatAclNode {
|
||||||
|
|
||||||
private final String path;
|
private final String path;
|
||||||
private final byte[] data;
|
private final byte[] data;
|
||||||
|
@ -33,7 +33,7 @@ public class DataStatAclNode {
|
||||||
private final List<ACL> acls;
|
private final List<ACL> acls;
|
||||||
private final long ephemeralOwner;
|
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.path = Preconditions.checkNotNull(path, "path can not be null");
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.stat = Preconditions.checkNotNull(stat, "stat can not be null");
|
this.stat = Preconditions.checkNotNull(stat, "stat can not be null");
|
||||||
|
@ -41,23 +41,23 @@ public class DataStatAclNode {
|
||||||
this.ephemeralOwner = ephemeralOwner;
|
this.ephemeralOwner = ephemeralOwner;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPath() {
|
String getPath() {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getData() {
|
byte[] getData() {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Stat getStat() {
|
Stat getStat() {
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ACL> getAcls() {
|
List<ACL> getAcls() {
|
||||||
return acls;
|
return acls;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getEphemeralOwner() {
|
long getEphemeralOwner() {
|
||||||
return ephemeralOwner;
|
return ephemeralOwner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
import java.net.URISyntaxException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Spliterators;
|
import java.util.Spliterators;
|
||||||
|
@ -64,9 +63,9 @@ class ZooKeeperMigrator {
|
||||||
|
|
||||||
private final ZooKeeperEndpointConfig zooKeeperEndpointConfig;
|
private final ZooKeeperEndpointConfig zooKeeperEndpointConfig;
|
||||||
|
|
||||||
ZooKeeperMigrator(String zookeeperEndpoint) throws URISyntaxException {
|
ZooKeeperMigrator(String zookeeperEndpoint) {
|
||||||
LOGGER.debug("ZooKeeper endpoint parameter: {}", 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);
|
final String[] connectStringPath = zookeeperEndpoint.split("/", 2);
|
||||||
Preconditions.checkArgument(connectStringPath.length >= 1, "invalid ZooKeeper endpoint: %s", zookeeperEndpoint);
|
Preconditions.checkArgument(connectStringPath.length >= 1, "invalid ZooKeeper endpoint: %s", zookeeperEndpoint);
|
||||||
final String connectString = connectStringPath[0];
|
final String connectString = connectStringPath[0];
|
||||||
|
@ -134,7 +133,7 @@ class ZooKeeperMigrator {
|
||||||
Preconditions.checkArgument(!Strings.isNullOrEmpty(sourceZooKeeperEndpointConfig.getConnectString()) && !Strings.isNullOrEmpty(sourceZooKeeperEndpointConfig.getPath()),
|
Preconditions.checkArgument(!Strings.isNullOrEmpty(sourceZooKeeperEndpointConfig.getConnectString()) && !Strings.isNullOrEmpty(sourceZooKeeperEndpointConfig.getPath()),
|
||||||
"Source ZooKeeper %s from %s is invalid", sourceZooKeeperEndpointConfig, zkData);
|
"Source ZooKeeper %s from %s is invalid", sourceZooKeeperEndpointConfig, zkData);
|
||||||
Preconditions.checkState(!zooKeeperEndpointConfig.equals(sourceZooKeeperEndpointConfig),
|
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);
|
sourceZooKeeperEndpointConfig, zooKeeperEndpointConfig);
|
||||||
|
|
||||||
// stream through each node read from the json input
|
// 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
|
// set data without caring what the previous version of the data at that path
|
||||||
zooKeeper.setData(node.getPath(), node.getData(), -1);
|
zooKeeper.setData(node.getPath(), node.getData(), -1);
|
||||||
zooKeeper.setACL(node.getPath(), node.getAcls(), -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) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(String.format("unable to transmit data to %s for path %s", zooKeeper, node.getPath()), e);
|
throw new RuntimeException(String.format("unable to transmit data to %s for path %s", zooKeeper, node.getPath()), e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class ZooKeeperMigratorMain {
|
||||||
.longOpt("zookeeper")
|
.longOpt("zookeeper")
|
||||||
.desc("ZooKeeper connect string with path (ex. host:port/path)")
|
.desc("ZooKeeper connect string with path (ex. host:port/path)")
|
||||||
.hasArg()
|
.hasArg()
|
||||||
.argName("connect-string")
|
.argName("zookeeper-endpoint")
|
||||||
.required()
|
.required()
|
||||||
.build();
|
.build();
|
||||||
private static final Option OPTION_RECEIVE = Option.builder("r")
|
private static final Option OPTION_RECEIVE = Option.builder("r")
|
||||||
|
@ -58,7 +58,7 @@ public class ZooKeeperMigratorMain {
|
||||||
.build();
|
.build();
|
||||||
private static final Option OPTION_ZK_AUTH_INFO = Option.builder("a")
|
private static final Option OPTION_ZK_AUTH_INFO = Option.builder("a")
|
||||||
.longOpt("auth")
|
.longOpt("auth")
|
||||||
.desc("username and password for the given ZK path")
|
.desc("username and password for the given ZooKeeper path")
|
||||||
.hasArg()
|
.hasArg()
|
||||||
.argName("username:password")
|
.argName("username:password")
|
||||||
.build();
|
.build();
|
||||||
|
|
Loading…
Reference in New Issue