You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/10/06 18:07:02 UTC
[GitHub] [accumulo] EdColeman opened a new pull request, #3003: remove extra node in prop path
EdColeman opened a new pull request, #3003:
URL: https://github.com/apache/accumulo/pull/3003
The original rework of the prop store was using a separate ZooKeeper node under the "original" configuration node. In ZooKeeper the structure looked like:
```
/accumulo/[instance id]/config/encoded_props <-- system props
/accumulo/[instance id]/namespaces/[nid]/conf/encoded_props <-- namespace props
/accumulo/[instance id]/tables/[tid]/conf/encoded_props <-- table props
```
This removed that extra node an stores the configuration directly in the configuration node. The structure now looks like:
```
/accumulo/[instance id]/config <-- system props
/accumulo/[instance id]/namespaces/[nid]/conf <-- namespace props
/accumulo/[instance id]/tables/[tid]/conf <-- table props
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] cshannon commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
cshannon commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1271771154
This change doesn't make sense to me to merge in now as it seems too late to be making a change like this with the 2.1.0 release being imminent. I would think it would be better to wait until the next version for this change and at the same time we can also rename system scope to be consistent with the others.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r997281698
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropLoader.java:
##########
@@ -63,6 +63,9 @@ public ZooPropLoader(final ZooReaderWriter zrw, final VersionedPropCodec propCod
Stat stat = new Stat();
byte[] bytes = zrw.getData(propStoreKey.getPath(), propStoreWatcher, stat);
+ if (bytes.length == 0) {
Review Comment:
Addressed in ac8d0b8da8 - in this case, the ZooKeeper stat is also being used, so that should be another reliable check for the data length. The NoNodeException likely was sufficient - but checking the stat does not seem to hurt.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r996921869
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -90,24 +85,33 @@ protected PropStoreKey(final InstanceId instanceId, final String path, final ID_
public static @Nullable PropStoreKey<?> fromPath(final String path) {
String[] tokens = path.split("/");
+ if (tokens.length < 1) {
+ return null;
+ }
+
InstanceId instanceId;
try {
instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
} catch (ArrayIndexOutOfBoundsException ex) {
log.warn("Path '{}' is an invalid path for a property cache key", path);
return null;
}
- if (tokens.length < 1 || !tokens[tokens.length - 1].equals(PROP_NODE_NAME)) {
- // without tokens or it does not end with PROP_NAME_NAME
- return null;
- }
- if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME)) {
+
+ String nodeName = "/" + tokens[tokens.length - 1];
+ if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME) && nodeName.equals(ZCONFIG)) {
return TablePropKey.of(instanceId, TableId.of(tokens[ID_TOKEN_POSITION]));
}
- if (tokens[TYPE_TOKEN_POSITION].equals(NAMESPACE_NODE_NAME)) {
+
+ if (tokens[TYPE_TOKEN_POSITION].equals(NAMESPACE_NODE_NAME) && nodeName.equals(ZCONFIG)) {
return NamespacePropKey.of(instanceId, NamespaceId.of(tokens[ID_TOKEN_POSITION]));
}
- return SystemPropKey.of(instanceId);
+
+ if (nodeName.equals(ZCONFIG)) {
Review Comment:
They are ordered in the most likely occurrence - in general the number of tables > number of namespaces > system so it seemed rational to order the check so that what would (hopefully) be more common to be checked first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] cshannon commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
cshannon commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r996450653
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropLoader.java:
##########
@@ -63,6 +63,9 @@ public ZooPropLoader(final ZooReaderWriter zrw, final VersionedPropCodec propCod
Stat stat = new Stat();
byte[] bytes = zrw.getData(propStoreKey.getPath(), propStoreWatcher, stat);
+ if (bytes.length == 0) {
Review Comment:
Can bytes be null here? I'm assuming not as I think you would just get a NoNodeException which is handled but thought I'd bring it up.
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -90,24 +85,33 @@ protected PropStoreKey(final InstanceId instanceId, final String path, final ID_
public static @Nullable PropStoreKey<?> fromPath(final String path) {
String[] tokens = path.split("/");
+ if (tokens.length < 1) {
+ return null;
+ }
+
InstanceId instanceId;
try {
instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
} catch (ArrayIndexOutOfBoundsException ex) {
log.warn("Path '{}' is an invalid path for a property cache key", path);
return null;
}
- if (tokens.length < 1 || !tokens[tokens.length - 1].equals(PROP_NODE_NAME)) {
- // without tokens or it does not end with PROP_NAME_NAME
- return null;
- }
- if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME)) {
+
+ String nodeName = "/" + tokens[tokens.length - 1];
+ if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME) && nodeName.equals(ZCONFIG)) {
return TablePropKey.of(instanceId, TableId.of(tokens[ID_TOKEN_POSITION]));
}
- if (tokens[TYPE_TOKEN_POSITION].equals(NAMESPACE_NODE_NAME)) {
+
+ if (tokens[TYPE_TOKEN_POSITION].equals(NAMESPACE_NODE_NAME) && nodeName.equals(ZCONFIG)) {
return NamespacePropKey.of(instanceId, NamespaceId.of(tokens[ID_TOKEN_POSITION]));
}
- return SystemPropKey.of(instanceId);
+
+ if (nodeName.equals(ZCONFIG)) {
Review Comment:
I was wondering if it make sense to do this check first? Since it's only one condition in theory it should be a little faster if it's a system prop to process as it is only 1 string comparison vs 2 for tables/namespaces. In practice it probably won't make a noticeable difference.
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -90,24 +85,33 @@ protected PropStoreKey(final InstanceId instanceId, final String path, final ID_
public static @Nullable PropStoreKey<?> fromPath(final String path) {
String[] tokens = path.split("/");
+ if (tokens.length < 1) {
+ return null;
+ }
+
InstanceId instanceId;
try {
instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
} catch (ArrayIndexOutOfBoundsException ex) {
log.warn("Path '{}' is an invalid path for a property cache key", path);
return null;
}
- if (tokens.length < 1 || !tokens[tokens.length - 1].equals(PROP_NODE_NAME)) {
- // without tokens or it does not end with PROP_NAME_NAME
- return null;
- }
- if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME)) {
+
+ String nodeName = "/" + tokens[tokens.length - 1];
+ if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME) && nodeName.equals(ZCONFIG)) {
Review Comment:
I think that in general this method could use a bit more robust validation of the tokens length before indexing. For example, on this line the code doesn't make sure the tokens length is long enough before indexing TYPE_TOKEN_POSITION. Because of this if you do something like call PropStoreKey.fromPath("/accumulo/" + iid); then an ArrayIndexoutOfBoundsException is thrown. In theory you wouldn't normally call this but good to handle all error cases.
One thing that might make it easier is to just wrap all the if statements here inside the try/catch block that already exists to handle IID_TOKEN_POSITION on line 93. That way if at any part of the processing we get an ArrayIndexoutOfBoundsException it can be handled the same way with the warning logged and null returned. Something like this could work:
```
try {
InstanceId instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
String nodeName = "/" + tokens[tokens.length - 1];
if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME) && nodeName.equals(ZCONFIG)) {
return TablePropKey.of(instanceId, TableId.of(tokens[ID_TOKEN_POSITION]));
}
if (tokens[TYPE_TOKEN_POSITION].equals(NAMESPACE_NODE_NAME) && nodeName.equals(ZCONFIG)) {
return NamespacePropKey.of(instanceId, NamespaceId.of(tokens[ID_TOKEN_POSITION]));
}
if (nodeName.equals(ZCONFIG)) {
return SystemPropKey.of(instanceId);
}
} catch (ArrayIndexOutOfBoundsException ex) {
log.warn("Path '{}' is an invalid path for a property cache key", path);
return null;
}
```
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropStore.java:
##########
@@ -222,6 +223,10 @@ public void create(PropStoreKey<?> propStoreKey, Map<String,String> props) {
try {
Stat stat = new Stat();
byte[] bytes = zooReader.getData(propStoreKey.getPath(), watcher, stat);
+ if (bytes.length == 0) {
Review Comment:
Same comment/question about bytes being null as above.
##########
server/base/src/main/java/org/apache/accumulo/server/conf/util/ConfigTransformer.java:
##########
@@ -152,18 +152,15 @@ VersionedProperties transform(final PropStoreKey<?> propStoreKey, final Transfor
}
}
- Set<LegacyPropNode> upgradeNodes = readLegacyProps(propStoreKey);
- if (upgradeNodes == null) {
- log.info("Found existing node after reading legacy props {}, skipping conversion",
+ Set<LegacyPropNode> upgradeNodes = readLegacyProps(legacyPath);
+ if (upgradeNodes.size() == 0) {
+ log.trace("No existing legacy props {}, skipping conversion, writing default prop node",
propStoreKey);
- results = ZooPropStore.readFromZk(propStoreKey, propStoreWatcher, zrw);
- if (results != null) {
- return results;
- }
+ return writeNode(propStoreKey, Map.of());
}
upgradeNodes = convertDeprecatedProps(propStoreKey, upgradeNodes);
-
+ // todo - here
Review Comment:
Did you mean to leave this here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r996928518
##########
server/base/src/main/java/org/apache/accumulo/server/conf/util/ConfigTransformer.java:
##########
@@ -152,18 +152,15 @@ VersionedProperties transform(final PropStoreKey<?> propStoreKey, final Transfor
}
}
- Set<LegacyPropNode> upgradeNodes = readLegacyProps(propStoreKey);
- if (upgradeNodes == null) {
- log.info("Found existing node after reading legacy props {}, skipping conversion",
+ Set<LegacyPropNode> upgradeNodes = readLegacyProps(legacyPath);
+ if (upgradeNodes.size() == 0) {
+ log.trace("No existing legacy props {}, skipping conversion, writing default prop node",
propStoreKey);
- results = ZooPropStore.readFromZk(propStoreKey, propStoreWatcher, zrw);
- if (results != null) {
- return results;
- }
+ return writeNode(propStoreKey, Map.of());
}
upgradeNodes = convertDeprecatedProps(propStoreKey, upgradeNodes);
-
+ // todo - here
Review Comment:
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r997276604
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -90,24 +85,33 @@ protected PropStoreKey(final InstanceId instanceId, final String path, final ID_
public static @Nullable PropStoreKey<?> fromPath(final String path) {
String[] tokens = path.split("/");
+ if (tokens.length < 1) {
+ return null;
+ }
+
InstanceId instanceId;
try {
instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
} catch (ArrayIndexOutOfBoundsException ex) {
log.warn("Path '{}' is an invalid path for a property cache key", path);
return null;
}
- if (tokens.length < 1 || !tokens[tokens.length - 1].equals(PROP_NODE_NAME)) {
- // without tokens or it does not end with PROP_NAME_NAME
- return null;
- }
- if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME)) {
+
+ String nodeName = "/" + tokens[tokens.length - 1];
+ if (tokens[TYPE_TOKEN_POSITION].equals(TABLES_NODE_NAME) && nodeName.equals(ZCONFIG)) {
Review Comment:
addressed in ac8d0b8da8
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] cshannon commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
cshannon commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r996455811
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropStore.java:
##########
@@ -438,6 +443,9 @@ private VersionedProperties readPropsFromZk(PropStoreKey<?> propStoreKey)
try {
Stat stat = new Stat();
byte[] bytes = zrw.getData(propStoreKey.getPath(), stat);
+ if (bytes.length == 0) {
Review Comment:
Same comment/question about bytes being null as above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1279322079
This now contains the changes needed to use config instead of conf as the configuration node name for tables and namespaces (system already used config)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] dlmarion commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
dlmarion commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r998066008
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -89,25 +89,44 @@ protected PropStoreKey(final InstanceId instanceId, final String path, final ID_
*/
public static @Nullable PropStoreKey<?> fromPath(final String path) {
String[] tokens = path.split("/");
+ if (tokens.length < 1) {
+ return null;
+ }
InstanceId instanceId;
try {
instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
+
+ // needs to start with /accumulo/[instanceId]
+ if (!path.startsWith(ZooUtil.getRoot(instanceId))) {
+ log.warn(
+ "Path '{}' is invalid for a property cache key, expected to start with /accumulo/[instance_id]",
Review Comment:
Is there a reason not to put the actual instanceId in the warning message?
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -89,25 +89,44 @@ protected PropStoreKey(final InstanceId instanceId, final String path, final ID_
*/
public static @Nullable PropStoreKey<?> fromPath(final String path) {
String[] tokens = path.split("/");
+ if (tokens.length < 1) {
+ return null;
+ }
InstanceId instanceId;
try {
instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
+
Review Comment:
Alternatively, you could remove the try/catch here and check that tokens.length equals EXPECTED_CONFIG_LEN or EXPECTED_SYS_CONFIG_LEN.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r997283473
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropStore.java:
##########
@@ -438,6 +443,9 @@ private VersionedProperties readPropsFromZk(PropStoreKey<?> propStoreKey)
try {
Stat stat = new Stat();
byte[] bytes = zrw.getData(propStoreKey.getPath(), stat);
+ if (bytes.length == 0) {
Review Comment:
Addressed in ac8d0b8da8 and see previous comment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] cshannon commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
cshannon commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1281482527
LGTM now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] cshannon commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
cshannon commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1271778414
Also if the reason to do it now would be that changing it later requires doing some upgrading/migration to the property store then that could just be part of the migration that needs to be done anyways if we rename the system level node from config to conf.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r989403399
##########
pom.xml:
##########
@@ -695,6 +695,11 @@
<artifactId>spotbugs-annotations</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
Review Comment:
We don't need to use provided scope. That is intended for shipping packages that depend on stuff provided by their containerized environment, like a Maven plugin expected to run inside Maven, or a WAR intended to run inside an application server.
Instead, we need to explicitly depend on this as a `test` dependency in places where we need it, or as an optional runtime dependency. For us, the runtime dependency doesn't really matter because we only need it for the distribution tarball.
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] cshannon commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
cshannon commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1271711649
> Changing the node name so that they match would require additional changes that would include removing the legacy node. It was easier now to keep the existing convention. I would suggest a follow-on PR. It is mainly going to be changes in the ConfigurationTransform code.
>
> A higher priority right now should be working to trace down the concurrency issues with multiple property updates - once those are resolved, this could be revisited.
Tests pass with the latest in PR #2967, See my comment here: https://github.com/apache/accumulo/pull/2967#issuecomment-1271706513
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1279187741
I have an update forthcoming that uses the same node name (config) instead of config for system and conf for namespace and tables - going through the final clean-up now. Because of merges, the push will likely be a force push.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] cshannon commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
cshannon commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1279183017
What's the status of this PR now? Is there anything else to do here or is it ready?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r998341033
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -89,25 +89,44 @@ protected PropStoreKey(final InstanceId instanceId, final String path, final ID_
*/
public static @Nullable PropStoreKey<?> fromPath(final String path) {
String[] tokens = path.split("/");
+ if (tokens.length < 1) {
+ return null;
+ }
InstanceId instanceId;
try {
instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
+
Review Comment:
addressed in b9ef24d03b
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1270582088
Changing the node name so that they match would require additional changes that would include removing the legacy node. It was easier now to keep the existing convention. I would suggest a follow-on PR. It is mainly going to be changes in the ConfigurationTransform code.
A higher priority right now should be working to trace down the concurrency issues with multiple property updates - once those are resolved, this could be revisited.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r989406545
##########
pom.xml:
##########
@@ -695,6 +695,11 @@
<artifactId>spotbugs-annotations</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
Review Comment:
This should be removed when #3000 is merged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#issuecomment-1270573354
This would fix #2690
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r998341443
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java:
##########
@@ -89,25 +89,44 @@ protected PropStoreKey(final InstanceId instanceId, final String path, final ID_
*/
public static @Nullable PropStoreKey<?> fromPath(final String path) {
String[] tokens = path.split("/");
+ if (tokens.length < 1) {
+ return null;
+ }
InstanceId instanceId;
try {
instanceId = InstanceId.of(tokens[IID_TOKEN_POSITION]);
+
+ // needs to start with /accumulo/[instanceId]
+ if (!path.startsWith(ZooUtil.getRoot(instanceId))) {
+ log.warn(
+ "Path '{}' is invalid for a property cache key, expected to start with /accumulo/[instance_id]",
Review Comment:
addressed in b9ef24d03b
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r997283276
##########
server/base/src/main/java/org/apache/accumulo/server/conf/util/ConfigTransformer.java:
##########
@@ -152,18 +152,15 @@ VersionedProperties transform(final PropStoreKey<?> propStoreKey, final Transfor
}
}
- Set<LegacyPropNode> upgradeNodes = readLegacyProps(propStoreKey);
- if (upgradeNodes == null) {
- log.info("Found existing node after reading legacy props {}, skipping conversion",
+ Set<LegacyPropNode> upgradeNodes = readLegacyProps(legacyPath);
+ if (upgradeNodes.size() == 0) {
+ log.trace("No existing legacy props {}, skipping conversion, writing default prop node",
propStoreKey);
- results = ZooPropStore.readFromZk(propStoreKey, propStoreWatcher, zrw);
- if (results != null) {
- return results;
- }
+ return writeNode(propStoreKey, Map.of());
}
upgradeNodes = convertDeprecatedProps(propStoreKey, upgradeNodes);
-
+ // todo - here
Review Comment:
Removed in ac8d0b8da8
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a diff in pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman commented on code in PR #3003:
URL: https://github.com/apache/accumulo/pull/3003#discussion_r997282597
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropStore.java:
##########
@@ -222,6 +223,10 @@ public void create(PropStoreKey<?> propStoreKey, Map<String,String> props) {
try {
Stat stat = new Stat();
byte[] bytes = zooReader.getData(propStoreKey.getPath(), watcher, stat);
+ if (bytes.length == 0) {
Review Comment:
Addressed in ac8d0b8da8 and see previous comment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] EdColeman merged pull request #3003: remove extra node in prop path
Posted by GitBox <gi...@apache.org>.
EdColeman merged PR #3003:
URL: https://github.com/apache/accumulo/pull/3003
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org