|
@@ -59,6 +59,8 @@ import org.apache.hadoop.security.UserGroupInformation;
|
|
import org.apache.hadoop.security.token.Token;
|
|
import org.apache.hadoop.security.token.Token;
|
|
import org.apache.hadoop.util.ShutdownHookManager;
|
|
import org.apache.hadoop.util.ShutdownHookManager;
|
|
|
|
|
|
|
|
+import com.google.common.base.Preconditions;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* The FileContext class provides an interface to the application writer for
|
|
* The FileContext class provides an interface to the application writer for
|
|
* using the Hadoop file system.
|
|
* using the Hadoop file system.
|
|
@@ -272,6 +274,7 @@ public class FileContext {
|
|
* has been deliberately declared private.
|
|
* has been deliberately declared private.
|
|
*/
|
|
*/
|
|
Path fixRelativePart(Path p) {
|
|
Path fixRelativePart(Path p) {
|
|
|
|
+ Preconditions.checkNotNull(p, "path cannot be null");
|
|
if (p.isUriPathAbsolute()) {
|
|
if (p.isUriPathAbsolute()) {
|
|
return p;
|
|
return p;
|
|
} else {
|
|
} else {
|