HADOOP-12191. Bzip2Factory is not thread safe. Contributed by Brahma Reddy Battula.
(cherry picked from commit 4084eaf943
)
This commit is contained in:
parent
9aa4411325
commit
0744a578e4
|
@ -15,6 +15,9 @@ Release 2.7.2 - UNRELEASED
|
||||||
HADOOP-12186. ActiveStandbyElector shouldn't call monitorLockNodeAsync
|
HADOOP-12186. ActiveStandbyElector shouldn't call monitorLockNodeAsync
|
||||||
multiple times (zhihai xu via vinayakumarb)
|
multiple times (zhihai xu via vinayakumarb)
|
||||||
|
|
||||||
|
HADOOP-12191. Bzip2Factory is not thread safe. (Brahma Reddy Battula
|
||||||
|
via ozawa)
|
||||||
|
|
||||||
Release 2.7.1 - 2015-07-06
|
Release 2.7.1 - 2015-07-06
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class Bzip2Factory {
|
||||||
* @return <code>true</code> if native-bzip2 is loaded & initialized
|
* @return <code>true</code> if native-bzip2 is loaded & initialized
|
||||||
* and can be loaded for this job, else <code>false</code>
|
* and can be loaded for this job, else <code>false</code>
|
||||||
*/
|
*/
|
||||||
public static boolean isNativeBzip2Loaded(Configuration conf) {
|
public static synchronized boolean isNativeBzip2Loaded(Configuration conf) {
|
||||||
String libname = conf.get("io.compression.codec.bzip2.library",
|
String libname = conf.get("io.compression.codec.bzip2.library",
|
||||||
"system-native");
|
"system-native");
|
||||||
if (!bzip2LibraryName.equals(libname)) {
|
if (!bzip2LibraryName.equals(libname)) {
|
||||||
|
|
Loading…
Reference in New Issue