Skip to content

Instantly share code, notes, and snippets.

@kpumuk
Created November 15, 2011 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kpumuk/1367382 to your computer and use it in GitHub Desktop.
Save kpumuk/1367382 to your computer and use it in GitHub Desktop.
Patch for hadoop-common to make hadoop-native work on OS X
Index: src/core/org/apache/hadoop/io/nativeio/NativeIO.java
--- src/core/org/apache/hadoop/io/nativeio/NativeIO.java 2011-11-14 23:51:25.000000000 -0500
+++ src/core/org/apache/hadoop/io/nativeio/NativeIO.java 2011-10-14 04:39:58.000000000 -0400
@@ -37,15 +37,15 @@
public static final int O_RDONLY = 00;
public static final int O_WRONLY = 01;
public static final int O_RDWR = 02;
- public static final int O_CREAT = 0100;
- public static final int O_EXCL = 0200;
- public static final int O_NOCTTY = 0400;
- public static final int O_TRUNC = 01000;
- public static final int O_APPEND = 02000;
- public static final int O_NONBLOCK = 04000;
- public static final int O_SYNC = 010000;
- public static final int O_ASYNC = 020000;
- public static final int O_FSYNC = O_SYNC;
+ public static final int O_CREAT = 0x200;
+ public static final int O_EXCL = 0x800;
+ public static final int O_NOCTTY = 0x20000;
+ public static final int O_TRUNC = 0x400;
+ public static final int O_APPEND = 0x8;
+ public static final int O_NONBLOCK = 0x4;
+ public static final int O_SYNC = 0x80;
+ public static final int O_ASYNC = 0x40;
+ public static final int O_FSYNC = 0x80;
public static final int O_NDELAY = O_NONBLOCK;
private static final Log LOG = LogFactory.getLog(NativeIO.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment