2
2
3
3
import org .apache .commons .io .FileUtils ;
4
4
import org .apache .commons .io .IOUtils ;
5
- import org .apache .commons .lang .SystemUtils ;
6
5
import org .apache .hadoop .conf .Configuration ;
7
6
import org .apache .hadoop .io .compress .SnappyCodec ;
8
7
import org .junit .AfterClass ;
@@ -25,13 +24,13 @@ public static void loadHadoopNativeLibrary() throws Exception
25
24
{
26
25
final String libResourceFolder ;
27
26
Map <String , String > libraryNames = new LinkedHashMap <>();
28
- if (SystemUtils . IS_OS_LINUX ) {
27
+ if (OSInfo . getOSName () == "Linux" ) {
29
28
libResourceFolder = "/lib/Linux" ;
30
29
libraryNames .put ("libhadoop.so" , "libhadoop.so" );
31
30
// certain Linux systems need these shared library be copied before the JVM started, see build.sbt
32
31
libraryNames .put ("libsnappy.so" , "libsnappy.so" );
33
32
libraryNames .put ("libsnappy.so.1" , "libsnappy.so" );
34
- } else if (SystemUtils . IS_OS_MAC_OSX ) {
33
+ } else if (OSInfo . getOSName () == "Mac" ) {
35
34
libResourceFolder = "/lib/MacOSX" ;
36
35
libraryNames .put ("libhadoop.dylib" , "libhadoop.dylib" );
37
36
libraryNames .put ("libsnappy.dylib" , "libsnappy.dylib" );
0 commit comments