-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
257 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
dora/core/common/src/main/java/alluxio/exception/ListOnNonDirectoryException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 | ||
* (the "License"). You may not use this work except in compliance with the License, which is | ||
* available at www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied, as more fully set forth in the License. | ||
* | ||
* See the NOTICE file distributed with this work for information regarding copyright ownership. | ||
*/ | ||
|
||
package alluxio.exception; | ||
|
||
import javax.annotation.concurrent.ThreadSafe; | ||
|
||
/** | ||
* Exception for situations where a listing operation happens on a non-directory file/object. | ||
*/ | ||
@ThreadSafe | ||
public class ListOnNonDirectoryException extends AlluxioException { | ||
private static final long serialVersionUID = -98364579823401L; | ||
|
||
/** | ||
* Constructs a new exception with the specified detail message. | ||
* | ||
* @param message the detail message | ||
*/ | ||
public ListOnNonDirectoryException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Constructs a new exception with the specified detail message and cause. | ||
* | ||
* @param message the detail message | ||
* @param cause the cause | ||
*/ | ||
public ListOnNonDirectoryException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
/** | ||
* Constructs a new exception with the specified exception message and multiple parameters. | ||
* | ||
* @param message the exception message | ||
* @param params the parameters | ||
*/ | ||
public ListOnNonDirectoryException(ExceptionMessage message, Object... params) { | ||
this(message.getMessage(params)); | ||
} | ||
|
||
/** | ||
* Constructs a new exception with the specified exception message, the cause and multiple | ||
* parameters. | ||
* | ||
* @param message the exception message | ||
* @param cause the cause | ||
* @param params the parameters | ||
*/ | ||
public ListOnNonDirectoryException(ExceptionMessage message, Throwable cause, | ||
Object... params) { | ||
this(message.getMessage(params), cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
dora/core/server/worker/src/main/java/alluxio/worker/dora/ListStatusResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package alluxio.worker.dora; | ||
|
||
import alluxio.underfs.UfsStatus; | ||
|
||
/** | ||
* The list status results stored in the cache. | ||
*/ | ||
public class ListStatusResult { | ||
public long mTimeStamp; | ||
public UfsStatus[] mUfsStatuses; | ||
|
||
ListStatusResult(long timeStamp, UfsStatus[] ufsStatuses) { | ||
mTimeStamp = timeStamp; | ||
mUfsStatuses = ufsStatuses; | ||
} | ||
} |
Oops, something went wrong.