File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,18 @@ public static IOException getRemoteException(ServiceException se) {
6363 * methods instead.
6464 */
6565 private final static ConcurrentHashMap <Object , ByteString >
66- fixedByteStringCache = new ConcurrentHashMap <>();
66+ FIXED_BYTESTRING_CACHE = new ConcurrentHashMap <>();
6767
6868 /**
6969 * Get the ByteString for frequently used fixed and small set strings.
7070 * @param key string
7171 * @return
7272 */
7373 public static ByteString getFixedByteString (Text key ) {
74- ByteString value = fixedByteStringCache .get (key );
74+ ByteString value = FIXED_BYTESTRING_CACHE .get (key );
7575 if (value == null ) {
7676 value = ByteString .copyFromUtf8 (key .toString ());
77- fixedByteStringCache .put (new Text (key .copyBytes ()), value );
77+ FIXED_BYTESTRING_CACHE .put (new Text (key .copyBytes ()), value );
7878 }
7979 return value ;
8080 }
@@ -85,10 +85,10 @@ public static ByteString getFixedByteString(Text key) {
8585 * @return
8686 */
8787 public static ByteString getFixedByteString (String key ) {
88- ByteString value = fixedByteStringCache .get (key );
88+ ByteString value = FIXED_BYTESTRING_CACHE .get (key );
8989 if (value == null ) {
9090 value = ByteString .copyFromUtf8 (key );
91- fixedByteStringCache .put (key , value );
91+ FIXED_BYTESTRING_CACHE .put (key , value );
9292 }
9393 return value ;
9494 }
You can’t perform that action at this time.
0 commit comments