91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 34KB
    文件類型: .java
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-06
  • 語言: Java
  • 標(biāo)簽: NativeIO??

資源簡介

修改后的NativeIO

資源截圖

代碼片段和文件信息

/**
?*?Licensed?to?the?Apache?Software?Foundation?(ASF)?under?one
?*?or?more?contributor?license?agreements.??See?the?NOTICE?file
?*?distributed?with?this?work?for?additional?information
?*?regarding?copyright?ownership.??The?ASF?licenses?this?file
?*?to?you?under?the?Apache?License?Version?2.0?(the
?*?“License“);?you?may?not?use?this?file?except?in?compliance
?*?with?the?License.??You?may?obtain?a?copy?of?the?License?at
?*
?*?????http://www.apache.org/licenses/LICENSE-2.0
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
?*?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?*/
package?org.apache.hadoop.io.nativeio;

import?com.google.common.annotations.VisibleForTesting;
import?org.apache.commons.logging.Log;
import?org.apache.commons.logging.LogFactory;
import?org.apache.hadoop.classification.InterfaceAudience;
import?org.apache.hadoop.classification.InterfaceStability;
import?org.apache.hadoop.conf.Configuration;
import?org.apache.hadoop.fs.CommonConfigurationKeys;
import?org.apache.hadoop.fs.Hardlink;
import?org.apache.hadoop.io.IOUtils;
import?org.apache.hadoop.io.SecureIOUtils.AlreadyExistsException;
import?org.apache.hadoop.util.NativeCodeLoader;
import?org.apache.hadoop.util.PerformanceAdvisory;
import?org.apache.hadoop.util.Shell;
import?sun.misc.Unsafe;

import?java.io.*;
import?java.lang.reflect.Field;
import?java.nio.ByteBuffer;
import?java.nio.MappedByteBuffer;
import?java.nio.channels.FileChannel;
import?java.util.Map;
import?java.util.concurrent.ConcurrentHashMap;

/**
?*?JNI?wrappers?for?various?native?IO-related?calls?not?available?in?Java.
?*?These?functions?should?generally?be?used?alongside?a?fallback?to?another
?*?more?portable?mechanism.
?*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
public?class?NativeIO?{
??public?static?class?POSIX?{
????//?Flags?for?open()?call?from?bits/fcntl.h
????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_NDELAY?=?O_NONBLOCK;

????//?Flags?for?posix_fadvise()?from?bits/fcntl.h
????/*?No?further?special?treatment.??*/
????public?static?final?int?POSIX_FADV_NORMAL?=?0;
????/*?Expect?random?page?references.??*/
????public?static?final?int?POSIX_FADV_RANDOM?=?1;
????/*?Expect?sequential?page?references.??*/
????public?static?fin

評論

共有 條評論