HDFS-13611. Unsafe use of Text as a ConcurrentHashMap key in PBHelperClient.
(cherry picked from commit c9b63deb53
)
This commit is contained in:
parent
de43b41d0f
commit
31d597f0c7
|
@ -247,7 +247,7 @@ public class PBHelperClient {
|
||||||
ByteString value = fixedByteStringCache.get(key);
|
ByteString value = fixedByteStringCache.get(key);
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
value = ByteString.copyFromUtf8(key.toString());
|
value = ByteString.copyFromUtf8(key.toString());
|
||||||
fixedByteStringCache.put(key, value);
|
fixedByteStringCache.put(new Text(key.copyBytes()), value);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue