dschneider-pivotal commented on a change in pull request #6961: URL: https://github.com/apache/geode/pull/6961#discussion_r728206045
########## File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisProperties.java ########## @@ -0,0 +1,26 @@ +/* + * 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.geode.redis.internal.data; Review comment: I don't think this new class belongs in the "data" package. I think it should be in "org.apache.geode.redis.internal" just like RedisConstants ########## File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisProperties.java ########## @@ -0,0 +1,26 @@ +/* + * 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.geode.redis.internal.data; + +public class RedisProperties { + public static int getIntegerSystemProperty(String propName, int defaultValue, int minValue) { + int timeout = Integer.getInteger(propName, defaultValue); Review comment: I noticed no support was added for a "geode." or "gemfire." prefix on the sys prop name. I thought we had decided to do that but could be remembering wrong. Or it could be done in its own PR instead of this one. ########## File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/NettyRedisServer.java ########## @@ -130,7 +135,7 @@ private Channel createChannel(int port) { .option(ChannelOption.SO_REUSEADDR, true) .option(ChannelOption.SO_RCVBUF, getBufferSize()) .childOption(ChannelOption.SO_KEEPALIVE, true) - .childOption(ChannelOption.CONNECT_TIMEOUT_MILLIS, CONNECT_TIMEOUT_MILLIS) + .childOption(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectTimeoutSeconds * 1000) Review comment: I thought we had decided to remove this childOption instead of adding a sys prop for it. Check with @jdeppe-pivotal ########## File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/RedisConstants.java ########## @@ -72,4 +72,10 @@ public static final String ERROR_KEY_REQUIRED = "at least 1 input key is needed for ZUNIONSTORE/ZINTERSTORE"; public static final String INTERNAL_SERVER_ERROR = "Internal server error: "; + + /** System Properties **/ + public static final String CONNECT_TIMEOUT_SECONDS = "geode-for-redis-connect-timeout-seconds"; Review comment: I think all these system property names should be moved to the new RedisProperties class. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
