Skip to content

Commit

Permalink
[ALLUXIO-3290] Journal state refactor (#7774)
Browse files Browse the repository at this point in the history
* [ALLUXIO-3290] Journal state refactor (#7749)

* Journal state refactor

* Cleanups

* Cleanup for inode persisting lock

* Fix issue with checking for persistence state IN_PROGRESS

* Fix concurrency

* Address Genes first round of review comments

* Fix test

* Add todo for changing TtlBucketList ownership

* Address Genes second round of comments

* Delete one file at a time and fix setting non-exteded acl mask

* Fix handling for extended acl masks

* Fatal error if applyAndJournal fails (#7767)

* [SMALLFIX] Add backwards compatibility test (#7765)

* Add backwards compatibility test

* Add profile for skipping slow tests

* Use excludesFile to exclude slow tests by default

* Test improvements

* Move journal generation to src/ and generate/test as root

* Fix checkstyle

* Re-organize and fix style

* Fix findbugs

* Update javadoc and add missing imports

* Add script for generating journals, and fix findbugs

* Fix test exclusion

* Sort dependencies alphabetically

* Use more descriptive method names in Clients.java

* Leave a directory mounted in Mount op

* Simplify async persist op

* Fix exclusion

* Fix issue with excluding from submodules

* change profile to runAllTests

* [SMALLFIX] Add additional tests (#7772)

* Add additional tests

* Fix checkstyle

* [SMALLFIX] Add test for removing extended acl masks (#7773)

* Add test for removing extended acl masks

* Fix checkstyle
  • Loading branch information
aaudiber authored and calvinjia committed Aug 17, 2018
1 parent 2c540de commit 1de584b
Show file tree
Hide file tree
Showing 119 changed files with 9,234 additions and 2,037 deletions.
4 changes: 1 addition & 3 deletions assembly/client/pom.xml
Expand Up @@ -25,9 +25,7 @@
<properties> <properties>
<!-- The following paths need to be defined here as well as in the parent pom so that mvn can --> <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
<!-- run properly from sub-project directories --> <!-- run properly from sub-project directories -->
<license.header.path>${project.parent.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.parent.basedir}/build/findbugs/</findbugs.path>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
</properties> </properties>


Expand Down
4 changes: 1 addition & 3 deletions assembly/pom.xml
Expand Up @@ -30,9 +30,7 @@
<properties> <properties>
<!-- The following paths need to be defined here as well as in the parent pom so that mvn can --> <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
<!-- run properly from sub-project directories --> <!-- run properly from sub-project directories -->
<license.header.path>${project.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.basedir}/build/findbugs/</findbugs.path>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
</properties> </properties>
</project> </project>
4 changes: 1 addition & 3 deletions assembly/server/pom.xml
Expand Up @@ -25,9 +25,7 @@
<properties> <properties>
<!-- The following paths need to be defined here as well as in the parent pom so that mvn can --> <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
<!-- run properly from sub-project directories --> <!-- run properly from sub-project directories -->
<license.header.path>${project.parent.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.parent.basedir}/build/findbugs/</findbugs.path>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
</properties> </properties>


Expand Down
1 change: 1 addition & 0 deletions build/surefire/no-excludes
@@ -0,0 +1 @@
# No files are excluded
1 change: 1 addition & 0 deletions build/surefire/slow-tests
@@ -0,0 +1 @@
**/BackwardsCompatibilityIntegrationTest
4 changes: 1 addition & 3 deletions core/client/fs/pom.xml
Expand Up @@ -25,9 +25,7 @@
<properties> <properties>
<!-- The following paths need to be defined here as well as in the parent pom so that mvn can --> <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
<!-- run properly from sub-project directories --> <!-- run properly from sub-project directories -->
<license.header.path>${project.parent.parent.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.parent.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.parent.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.parent.parent.basedir}/build/findbugs/</findbugs.path>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
</properties> </properties>


Expand Down
Expand Up @@ -394,6 +394,12 @@ public void rename(AlluxioURI src, AlluxioURI dst, RenameOptions options)
} }
} }


@Override
public void setAcl(AlluxioURI path, SetAclAction action, List<AclEntry> entries)
throws FileDoesNotExistException, IOException, AlluxioException {
setAcl(path, action, entries, SetAclOptions.defaults());
}

@Override @Override
public void setAcl(AlluxioURI path, SetAclAction action, List<AclEntry> entries, public void setAcl(AlluxioURI path, SetAclAction action, List<AclEntry> entries,
SetAclOptions options) throws FileDoesNotExistException, IOException, AlluxioException { SetAclOptions options) throws FileDoesNotExistException, IOException, AlluxioException {
Expand Down
12 changes: 12 additions & 0 deletions core/client/fs/src/main/java/alluxio/client/file/FileSystem.java
Expand Up @@ -333,6 +333,18 @@ void rename(AlluxioURI src, AlluxioURI dst)
void rename(AlluxioURI src, AlluxioURI dst, RenameOptions options) void rename(AlluxioURI src, AlluxioURI dst, RenameOptions options)
throws FileDoesNotExistException, IOException, AlluxioException; throws FileDoesNotExistException, IOException, AlluxioException;


/**
* Convenience method for {@link #setAcl(AlluxioURI, SetAclAction, List, SetAclOptions)} with
* default options.
*
* @param path the path to set the ACL for
* @param action the set action to perform
* @param entries the ACL entries
* @throws FileDoesNotExistException if the given file does not exist
*/
void setAcl(AlluxioURI path, SetAclAction action, List<AclEntry> entries)
throws FileDoesNotExistException, IOException, AlluxioException;

/** /**
* Sets the ACL for a path. * Sets the ACL for a path.
* *
Expand Down
4 changes: 1 addition & 3 deletions core/client/hdfs/pom.xml
Expand Up @@ -25,9 +25,7 @@
<properties> <properties>
<!-- The following paths need to be defined here as well as in the parent pom so that mvn can --> <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
<!-- run properly from sub-project directories --> <!-- run properly from sub-project directories -->
<license.header.path>${project.parent.parent.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.parent.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.parent.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.parent.parent.basedir}/build/findbugs/</findbugs.path>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
</properties> </properties>


Expand Down
4 changes: 1 addition & 3 deletions core/client/pom.xml
Expand Up @@ -31,9 +31,7 @@
<properties> <properties>
<!-- These need to be defined here as well as in the parent pom so that mvn can run <!-- These need to be defined here as well as in the parent pom so that mvn can run
properly from sub-project directories --> properly from sub-project directories -->
<license.header.path>${project.parent.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.parent.basedir}/build/findbugs/</findbugs.path>
</properties> </properties>


</project> </project>
4 changes: 1 addition & 3 deletions core/client/runtime/pom.xml
Expand Up @@ -25,9 +25,7 @@
<properties> <properties>
<!-- The following paths need to be defined here as well as in the parent pom so that mvn can --> <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
<!-- run properly from sub-project directories --> <!-- run properly from sub-project directories -->
<license.header.path>${project.parent.parent.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.parent.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.parent.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.parent.parent.basedir}/build/findbugs/</findbugs.path>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
<!-- The shading prefix should match the artifact ID, replacing '-' with '.' --> <!-- The shading prefix should match the artifact ID, replacing '-' with '.' -->
<shading.prefix>alluxio.core.client.runtime</shading.prefix> <shading.prefix>alluxio.core.client.runtime</shading.prefix>
Expand Down
4 changes: 1 addition & 3 deletions core/common/pom.xml
Expand Up @@ -25,9 +25,7 @@
<properties> <properties>
<!-- The following paths need to be defined here as well as in the parent pom so that mvn can --> <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
<!-- run properly from sub-project directories --> <!-- run properly from sub-project directories -->
<license.header.path>${project.parent.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.parent.basedir}/build/findbugs/</findbugs.path>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
</properties> </properties>


Expand Down
Expand Up @@ -169,7 +169,7 @@ public boolean hasExtended() {
* *
* @param entry the entry to be removed * @param entry the entry to be removed
*/ */
public void removeEntry(AclEntry entry) throws IOException { public void removeEntry(AclEntry entry) {
switch (entry.getType()) { switch (entry.getType()) {
case NAMED_USER: // fall through case NAMED_USER: // fall through
case NAMED_GROUP: // fall through case NAMED_GROUP: // fall through
Expand Down
Expand Up @@ -16,7 +16,6 @@


import com.google.common.base.Objects; import com.google.common.base.Objects;


import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;


Expand Down Expand Up @@ -101,7 +100,7 @@ public Pair<AccessControlList, DefaultAccessControlList> generateChildDirACL() {
* @param entry the entry to be removed * @param entry the entry to be removed
*/ */
@Override @Override
public void removeEntry(AclEntry entry) throws IOException { public void removeEntry(AclEntry entry) {
switch (entry.getType()) { switch (entry.getType()) {
case NAMED_USER: case NAMED_USER:
case NAMED_GROUP: case NAMED_GROUP:
Expand Down
Expand Up @@ -16,7 +16,6 @@
import com.google.common.base.Objects; import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;


import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
Expand Down Expand Up @@ -97,7 +96,7 @@ public boolean hasExtended() {
* *
* @param entry the entry to be removed * @param entry the entry to be removed
*/ */
public void removeEntry(AclEntry entry) throws IOException { public void removeEntry(AclEntry entry) {
switch (entry.getType()) { switch (entry.getType()) {
case NAMED_USER: case NAMED_USER:
mNamedUserActions.remove(entry.getSubject()); mNamedUserActions.remove(entry.getSubject());
Expand All @@ -107,8 +106,7 @@ public void removeEntry(AclEntry entry) throws IOException {
return; return;
case MASK: case MASK:
if (hasExtended()) { if (hasExtended()) {
// cannot remove the mask if it is extended. throw new IllegalStateException(
throw new IOException(
"Deleting the mask for extended ACLs is not allowed. entry: " + entry); "Deleting the mask for extended ACLs is not allowed. entry: " + entry);
} else { } else {
mMaskActions = new AclActions(); mMaskActions = new AclActions();
Expand Down
1 change: 0 additions & 1 deletion core/common/src/main/java/alluxio/wire/SetAclAction.java
Expand Up @@ -19,7 +19,6 @@


/** /**
* Represents the possible actions for setting ACL. * Represents the possible actions for setting ACL.
*
*/ */
@PublicApi @PublicApi
@ThreadSafe @ThreadSafe
Expand Down
4 changes: 1 addition & 3 deletions core/pom.xml
Expand Up @@ -32,8 +32,6 @@
<properties> <properties>
<!-- These need to be defined here as well as in the parent pom so that mvn can run <!-- These need to be defined here as well as in the parent pom so that mvn can run
properly from sub-project directories --> properly from sub-project directories -->
<license.header.path>${project.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.basedir}/build/findbugs/</findbugs.path>
</properties> </properties>
</project> </project>
4 changes: 1 addition & 3 deletions core/protobuf/pom.xml
Expand Up @@ -25,9 +25,7 @@
<properties> <properties>
<!-- The following paths need to be defined here as well as in the parent pom so that mvn can --> <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
<!-- run properly from sub-project directories --> <!-- run properly from sub-project directories -->
<license.header.path>${project.parent.parent.basedir}/build/license/</license.header.path> <build.path>${project.parent.parent.basedir}/build</build.path>
<checkstyle.path>${project.parent.parent.basedir}/build/checkstyle/</checkstyle.path>
<findbugs.path>${project.parent.parent.basedir}/build/findbugs/</findbugs.path>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
<!-- The shading prefix should match the artifact ID, replacing '-' with '.' --> <!-- The shading prefix should match the artifact ID, replacing '-' with '.' -->
<shading.prefix>alluxio.core.protobuf</shading.prefix> <shading.prefix>alluxio.core.protobuf</shading.prefix>
Expand Down

0 comments on commit 1de584b

Please sign in to comment.