Skip to content

Conversation

@jdeppe-pivotal
Copy link
Contributor

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.

public ExpirationAttributes(int expirationTime, ExpirationAction expirationAction) {
this.timeout = expirationTime;
this.action = expirationAction;
if (expirationTime < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that the javadoc says this method should throw an IllegalArgumentException if the expirationTime is nonpositive. We should either update the javadoc or throw the exception in that case.

CliStrings.ALTER_REGION__MSG__SPECIFY_VALID_CLASSNAME_FOR_CACHELISTENER_0_IS_INVALID,
new Object[] {cacheListener}));
}
cacheLoader = convertDefaultValue(cacheLoader, StringUtils.EMPTY);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have expected the @CliOption parameters to deal with these default values. Do you know if there is a reason we did it here instead?

if (r != null)
return r;
do {
// String command = "create region --name="+key+" --type="+defaultRegionType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it was left around by accident.

assertThat(args.getEntryExpirationTTL()).isNull();
assertThat(args.getRegionExpirationIdleTime()).isNull();
assertThat(args.getRegionExpirationTTL()).isNull();
//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this comment got left behind

}
}

// CommandExecutor executor = new CommandExecutor();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it was left around by accident.

- Also updated sanctionedSerializables
import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was import ordering changed. Our standard has java.* classes preceding org.apache.geode classes.

Copy link

@pdxrunner pdxrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lot of the changed files have reorder imports. Please insure that they are all standardized

int initialCapacity = 16;
float loadFactor = 0.75f;
int concurrencyLevel = 16;
int concurrencyLevel = DEFAULT_CONCURRENCY_LEVEL;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only define symbolic constant for concurrencyLevel? For consistency I'd either define constants for all the unexplained hardcoded numbers (initialCapacity & loadFactor ?) or none of them. DEFAULT_CONCURRENCY is only used the once so I don't see a reason for singling it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to be able to reference this value outside of this class. I guess the other values aren't being used/referenced anywhere outside of this class.

Also, the AttributesFactory class is deprecated, so making larger changes is less important I think.


import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import ordering - see my comment on AttributesFactory

public String getCacheWriterClass() {
return cacheWriterClass;
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 I like the removal of the inner class


@Test
public void testRegionExistsReturnsCorrectValue() throws Exception {
InternalCache cache = mock(InternalCache.class);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete as you now have cache as in instance variable that's set in the @before

@jdeppe-pivotal jdeppe-pivotal merged commit 7a7c2ef into apache:develop Oct 24, 2017
@jdeppe-pivotal jdeppe-pivotal deleted the feature/GEODE-1897 branch October 24, 2017 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants