private static EnumSetWritable<CreateFlag> getCreateFlags(boolean overwrite,
    boolean noLocalWrite) {
    List<CreateFlag> flags = new ArrayList<>();
    flags.add(CreateFlag.CREATE);
    if (overwrite) {
      flags.add(CreateFlag.OVERWRITE);
    }
    if (noLocalWrite) {
      flags.add(CreateFlag.NO_LOCAL_WRITE);
    }
    flags.add(CreateFlag.SHOULD_REPLICATE);
    return new EnumSetWritable<>(EnumSet.copyOf(flags));
  }
Exception other than RemoteException thrown when calling create on namenode
hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java