You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by wa...@apache.org on 2014/07/30 08:09:34 UTC
svn commit: r1614553 - in
/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common:
./ src/main/java/ src/main/java/org/apache/hadoop/fs/ src/main/resources/
src/test/java/org/apache/hadoop/fs/
Author: wang
Date: Wed Jul 30 06:09:33 2014
New Revision: 1614553
URL: http://svn.apache.org/r1614553
Log:
Merge from trunk to branch
Modified:
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/CHANGES.txt (contents, props changed)
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/ (props changed)
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestPath.java
Modified: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1614553&r1=1614552&r2=1614553&view=diff
==============================================================================
--- hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/CHANGES.txt Wed Jul 30 06:09:33 2014
@@ -460,6 +460,9 @@ Release 2.6.0 - UNRELEASED
HADOOP-10882. Move DirectBufferPool into common util. (todd)
+ HADOOP-8069. Enable TCP_NODELAY by default for IPC. (Todd Lipcon via
+ Arpit Agarwal)
+
OPTIMIZATIONS
BUG FIXES
@@ -491,6 +494,9 @@ Release 2.6.0 - UNRELEASED
HADOOP-10830. Missing lock in JavaKeyStoreProvider.createCredentialEntry.
(Benoy Antony via umamahesh)
+ HADOOP-10876. The constructor of Path should not take an empty URL as a
+ parameter. (Zhihai Xu via wang)
+
Release 2.5.0 - UNRELEASED
INCOMPATIBLE CHANGES
Propchange: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/CHANGES.txt
------------------------------------------------------------------------------
Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt:r1613788-1614550
Propchange: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/
------------------------------------------------------------------------------
Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java:r1613788-1614550
Modified: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java?rev=1614553&r1=1614552&r2=1614553&view=diff
==============================================================================
--- hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java (original)
+++ hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java Wed Jul 30 06:09:33 2014
@@ -1040,21 +1040,10 @@ public abstract class AbstractFileSystem
/**
* Set an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * A regular user can only set an xattr for the "user" namespace.
- * The super user can set an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set when the logged-in user has the correct permissions.
- * If the xattr exists, it will be replaced.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to modify
* @param name xattr name.
@@ -1069,21 +1058,10 @@ public abstract class AbstractFileSystem
/**
* Set an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
- * <p/>
- * A regular user can only set an xattr for the "user" namespace.
- * The super user can set an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set when the logged-in user has the correct permissions.
- * If the xattr exists, it will be replaced.
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to modify
* @param name xattr name.
@@ -1099,18 +1077,10 @@ public abstract class AbstractFileSystem
/**
* Get an xattr for a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
- * <p/>
- * A regular user can only get an xattr for the "user" namespace.
- * The super user can get an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * An xattr will only be returned when the logged-in user has the correct permissions.
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attribute
* @param name xattr name.
@@ -1127,13 +1097,7 @@ public abstract class AbstractFileSystem
* Only those xattrs for which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattrs for the "user" namespace.
- * The super user can only get xattrs for "user" and "trusted" namespaces.
- * The xattr of "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @return Map<String, byte[]> describing the XAttrs of the file or directory
@@ -1149,13 +1113,7 @@ public abstract class AbstractFileSystem
* Only those xattrs for which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattrs for the "user" namespace.
- * The super user can only get xattrs for "user" and "trusted" namespaces.
- * The xattr of "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @param names XAttr names.
@@ -1173,14 +1131,7 @@ public abstract class AbstractFileSystem
* Only the xattr names for which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattr names for the "user" namespace.
- * The super user can only get xattr names for the "user" and "trusted"
- * namespaces.
- * The xattr names in the "security" and "system" namespaces are only
- * used/exposed internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @return Map<String, byte[]> describing the XAttrs of the file or directory
@@ -1194,21 +1145,10 @@ public abstract class AbstractFileSystem
/**
* Remove an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
- * <p/>
- * A regular user can only remove an xattr for the "user" namespace.
- * The super user can remove an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set when the logged-in user has the correct permissions.
- * If the xattr exists, it will be replaced.
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to remove extended attribute
* @param name xattr name
Modified: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java?rev=1614553&r1=1614552&r2=1614553&view=diff
==============================================================================
--- hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java (original)
+++ hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java Wed Jul 30 06:09:33 2014
@@ -207,7 +207,7 @@ public class CommonConfigurationKeysPubl
public static final String IPC_CLIENT_TCPNODELAY_KEY =
"ipc.client.tcpnodelay";
/** Defalt value for IPC_CLIENT_TCPNODELAY_KEY */
- public static final boolean IPC_CLIENT_TCPNODELAY_DEFAULT = false;
+ public static final boolean IPC_CLIENT_TCPNODELAY_DEFAULT = true;
/** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
public static final String IPC_SERVER_LISTEN_QUEUE_SIZE_KEY =
"ipc.server.listen.queue.size";
@@ -226,7 +226,7 @@ public class CommonConfigurationKeysPubl
public static final String IPC_SERVER_TCPNODELAY_KEY =
"ipc.server.tcpnodelay";
/** Default value for IPC_SERVER_TCPNODELAY_KEY */
- public static final boolean IPC_SERVER_TCPNODELAY_DEFAULT = false;
+ public static final boolean IPC_SERVER_TCPNODELAY_DEFAULT = true;
/** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
public static final String HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY =
Modified: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java?rev=1614553&r1=1614552&r2=1614553&view=diff
==============================================================================
--- hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java (original)
+++ hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java Wed Jul 30 06:09:33 2014
@@ -2297,21 +2297,10 @@ public final class FileContext {
/**
* Set an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * A regular user can only set an xattr for the "user" namespace.
- * The super user can set an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set when the logged-in user has the correct permissions.
- * If the xattr exists, it will be replaced.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to modify
* @param name xattr name.
@@ -2326,21 +2315,10 @@ public final class FileContext {
/**
* Set an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
- * <p/>
- * A regular user can only set an xattr for the "user" namespace.
- * The super user can set an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set when the logged-in user has the correct permissions.
- * If the xattr exists, it will be replaced.
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to modify
* @param name xattr name.
@@ -2363,19 +2341,10 @@ public final class FileContext {
/**
* Get an xattr for a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
- * <p/>
- *
- * A regular user can only get an xattr for the "user" namespace.
- * The super user can get an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * An xattr will only be returned when the logged-in user has the correct permissions.
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attribute
* @param name xattr name.
@@ -2398,13 +2367,7 @@ public final class FileContext {
* Only those xattrs for which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattrs for the "user" namespace.
- * The super user can only get xattrs for "user" and "trusted" namespaces.
- * The xattr of "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @return Map<String, byte[]> describing the XAttrs of the file or directory
@@ -2426,13 +2389,7 @@ public final class FileContext {
* Only those xattrs for which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattrs for the "user" namespace.
- * The super user can only get xattrs for "user" and "trusted" namespaces.
- * The xattr of "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @param names XAttr names.
@@ -2453,21 +2410,10 @@ public final class FileContext {
/**
* Remove an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * A regular user can only remove an xattr for the "user" namespace.
- * The super user can remove an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set when the logged-in user has the correct permissions.
- * If the xattr exists, it will be replaced.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to remove extended attribute
* @param name xattr name
@@ -2490,14 +2436,7 @@ public final class FileContext {
* Only those xattr names which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattr names for the "user" namespace.
- * The super user can only get xattr names for "user" and "trusted"
- * namespaces.
- * The xattrs of the "security" and "system" namespaces are only
- * used/exposed internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @return List<String> of the XAttr names of the file or directory
Modified: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java?rev=1614553&r1=1614552&r2=1614553&view=diff
==============================================================================
--- hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java Wed Jul 30 06:09:33 2014
@@ -2364,21 +2364,10 @@ public abstract class FileSystem extends
/**
* Set an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * A regular user can only set an xattr for the "user" namespace.
- * The super user can set an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set when the logged-in user has the correct permissions.
- * If the xattr exists, it will be replaced.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to modify
* @param name xattr name.
@@ -2393,21 +2382,10 @@ public abstract class FileSystem extends
/**
* Set an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
- * <p/>
- * A regular user can only set an xattr for the "user" namespace.
- * The super user can set an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set if the logged-in user has the correct permissions.
- * If the xattr exists, it is replaced.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to modify
* @param name xattr name.
@@ -2423,20 +2401,10 @@ public abstract class FileSystem extends
/**
* Get an xattr name and value for a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
- * <p/>
- *
- * A regular user can only get an xattr for the "user" namespace.
- * The super user can get an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * An xattr will only be returned if the logged-in user has the
- * correct permissions.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attribute
* @param name xattr name.
@@ -2453,13 +2421,7 @@ public abstract class FileSystem extends
* Only those xattrs which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattrs for the "user" namespace.
- * The super user can only get xattrs for "user" and "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @return Map<String, byte[]> describing the XAttrs of the file or directory
@@ -2475,13 +2437,7 @@ public abstract class FileSystem extends
* Only those xattrs which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattrs for the "user" namespace.
- * The super user can only get xattrs for "user" and "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @param names XAttr names.
@@ -2499,14 +2455,7 @@ public abstract class FileSystem extends
* Only those xattr names which the logged-in user has permissions to view
* are returned.
* <p/>
- * A regular user can only get xattr names for the "user" namespace.
- * The super user can only get xattr names for "user" and "trusted"
- * namespaces.
- * The xattrs of the "security" and "system" namespaces are only
- * used/exposed internally by/to the FS impl.
- * <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to get extended attributes
* @return List<String> of the XAttr names of the file or directory
@@ -2519,21 +2468,10 @@ public abstract class FileSystem extends
/**
* Remove an xattr of a file or directory.
- * The name must be prefixed with user/trusted/security/system and
- * followed by ".". For example, "user.attr".
- * <p/>
- * A regular user can only remove an xattr for the "user" namespace.
- * The super user can remove an xattr of either the "user" or "trusted" namespaces.
- * The xattrs of the "security" and "system" namespaces are only used/exposed
- * internally by/to the FS impl.
- * <p/>
- * The access permissions of an xattr in the "user" namespace are
- * defined by the file and directory permission bits.
- * An xattr can only be set when the logged-in user has the correct permissions.
- * If the xattr exists, it will be replaced.
+ * The name must be prefixed with the namespace followed by ".". For example,
+ * "user.attr".
* <p/>
- * @see <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">
- * http://en.wikipedia.org/wiki/Extended_file_attributes</a>
+ * Refer to the HDFS extended attributes user documentation for details.
*
* @param path Path to remove extended attribute
* @param name xattr name
Modified: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java?rev=1614553&r1=1614552&r2=1614553&view=diff
==============================================================================
--- hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java (original)
+++ hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java Wed Jul 30 06:09:33 2014
@@ -128,7 +128,20 @@ public class Path implements Comparable
"Can not create a Path from an empty string");
}
}
-
+
+ /** check URI parameter of Path constructor. */
+ private void checkPathArg(URI aUri) throws IllegalArgumentException {
+ // disallow construction of a Path from an empty URI
+ if (aUri == null) {
+ throw new IllegalArgumentException(
+ "Can not create a Path from a null URI");
+ }
+ if (aUri.toString().isEmpty()) {
+ throw new IllegalArgumentException(
+ "Can not create a Path from an empty URI");
+ }
+ }
+
/** Construct a path from a String. Path strings are URIs, but with
* unescaped elements and some additional normalization. */
public Path(String pathString) throws IllegalArgumentException {
@@ -176,6 +189,7 @@ public class Path implements Comparable
* Construct a path from a URI
*/
public Path(URI aUri) {
+ checkPathArg(aUri);
uri = aUri.normalize();
}
Modified: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml?rev=1614553&r1=1614552&r2=1614553&view=diff
==============================================================================
--- hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml (original)
+++ hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml Wed Jul 30 06:09:33 2014
@@ -807,25 +807,6 @@ for ldap providers in the same way as ab
</description>
</property>
-<property>
- <name>ipc.server.tcpnodelay</name>
- <value>false</value>
- <description>Turn on/off Nagle's algorithm for the TCP socket connection on
- the server. Setting to true disables the algorithm and may decrease latency
- with a cost of more/smaller packets.
- </description>
-</property>
-
-<property>
- <name>ipc.client.tcpnodelay</name>
- <value>false</value>
- <description>Turn on/off Nagle's algorithm for the TCP socket connection on
- the client. Setting to true disables the algorithm and may decrease latency
- with a cost of more/smaller packets.
- </description>
-</property>
-
-
<!-- Proxy Configuration -->
<property>
Modified: hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestPath.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestPath.java?rev=1614553&r1=1614552&r2=1614553&view=diff
==============================================================================
--- hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestPath.java (original)
+++ hadoop/common/branches/fs-encryption/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestPath.java Wed Jul 30 06:09:33 2014
@@ -26,11 +26,13 @@ import java.util.Arrays;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.AvroTestUtil;
+import org.apache.hadoop.test.GenericTestUtils;
import org.apache.hadoop.util.Shell;
import com.google.common.base.Joiner;
import junit.framework.TestCase;
+import static org.junit.Assert.fail;
public class TestPath extends TestCase {
/**
@@ -305,6 +307,28 @@ public class TestPath extends TestCase {
// if the child uri is absolute path
assertEquals("foo://bar/fud#boo", new Path(new Path(new URI(
"foo://bar/baz#bud")), new Path(new URI("/fud#boo"))).toString());
+
+ // empty URI
+ URI uri3 = new URI("");
+ assertEquals("", uri3.toString());
+ try {
+ path = new Path(uri3);
+ fail("Expected exception for empty URI");
+ } catch (IllegalArgumentException e) {
+ // expect to receive an IllegalArgumentException
+ GenericTestUtils.assertExceptionContains("Can not create a Path"
+ + " from an empty URI", e);
+ }
+ // null URI
+ uri3 = null;
+ try {
+ path = new Path(uri3);
+ fail("Expected exception for null URI");
+ } catch (IllegalArgumentException e) {
+ // expect to receive an IllegalArgumentException
+ GenericTestUtils.assertExceptionContains("Can not create a Path"
+ + " from a null URI", e);
+ }
}
/** Test URIs created from Path objects */