public FadvisedFileRegion(RandomAccessFile file, long position, long count, boolean manageOsCache, int readaheadLength, ReadaheadPool readaheadPool, String identifier, int shuffleBufferSize, boolean shuffleTransferToAllowed) throws IOException { super(file.getChannel(), position, count); this.manageOsCache = manageOsCache; this.readaheadLength = readaheadLength; this.readaheadPool = readaheadPool; this.fd = file.getFD(); this.identifier = identifier; this.fileChannel = file.getChannel(); this.count = count; this.position = position; this.shuffleBufferSize = shuffleBufferSize; this.shuffleTransferToAllowed = shuffleTransferToAllowed; }
public FadvisedChunkedFile(RandomAccessFile file, long position, long count, int chunkSize, boolean manageOsCache, int readaheadLength, ReadaheadPool readaheadPool, String identifier) throws IOException { super(file, position, count, chunkSize); this.manageOsCache = manageOsCache; this.readaheadLength = readaheadLength; this.readaheadPool = readaheadPool; this.fd = file.getFD(); this.identifier = identifier; }
public FadvisedFileRegion(RandomAccessFile file, long position, long count, boolean manageOsCache, int readaheadLength, ReadaheadPool readaheadPool, String identifier) throws IOException { super(file.getChannel(), position, count); this.manageOsCache = manageOsCache; this.readaheadLength = readaheadLength; this.readaheadPool = readaheadPool; this.fd = file.getFD(); this.identifier = identifier; }
/** * This method starts the data node with the specified conf. * * @param conf - the configuration * if conf's CONFIG_PROPERTY_SIMULATED property is set * then a simulated storage based data node is created. * * @param dataDirs - only for a non-simulated storage data node * @throws IOException */ void startDataNode(Configuration conf, AbstractList<File> dataDirs, // DatanodeProtocol namenode, SecureResources resources ) throws IOException { if(UserGroupInformation.isSecurityEnabled() && resources == null) { if (!conf.getBoolean("ignore.secure.ports.for.testing", false)) { throw new RuntimeException("Cannot start secure cluster without " + "privileged resources."); } } // settings global for all BPs in the Data Node this.secureResources = resources; this.dataDirs = dataDirs; this.conf = conf; this.dnConf = new DNConf(conf); storage = new DataStorage(); // global DN settings registerMXBean(); initDataXceiver(conf); startInfoServer(conf); // BlockPoolTokenSecretManager is required to create ipc server. this.blockPoolTokenSecretManager = new BlockPoolTokenSecretManager(); initIpcServer(conf); metrics = DataNodeMetrics.create(conf, getDisplayName()); blockPoolManager = new BlockPoolManager(this); blockPoolManager.refreshNamenodes(conf); // Create the ReadaheadPool from the DataNode context so we can // exit without having to explicitly shutdown its thread pool. readaheadPool = ReadaheadPool.getInstance(); }
/** * This method starts the data node with the specified conf. * * @param conf * - the configuration * if conf's CONFIG_PROPERTY_SIMULATED property is set * then a simulated storage based data node is created. * @param dataDirs * - only for a non-simulated storage data node * @throws IOException */ void startDataNode(Configuration conf, AbstractList<File> dataDirs, // DatanodeProtocol namenode, SecureResources resources) throws IOException { if (UserGroupInformation.isSecurityEnabled() && resources == null) { if (!conf.getBoolean("ignore.secure.ports.for.testing", false)) { throw new RuntimeException( "Cannot start secure cluster without " + "privileged resources."); } } // settings global for all BPs in the Data Node this.secureResources = resources; this.dataDirs = dataDirs; this.conf = conf; this.dnConf = new DNConf(conf); storage = new DataStorage(); // global DN settings registerMXBean(); initDataXceiver(conf); startInfoServer(conf); // BlockPoolTokenSecretManager is required to create ipc server. this.blockPoolTokenSecretManager = new BlockPoolTokenSecretManager(); initIpcServer(conf); metrics = DataNodeMetrics.create(conf, getDisplayName()); blockPoolManager = new BlockPoolManager(this); blockPoolManager.refreshNamenodes(conf); // Create the ReadaheadPool from the DataNode context so we can // exit without having to explicitly shutdown its thread pool. readaheadPool = ReadaheadPool.getInstance(); }
public FadvisedFileRegion(RandomAccessFile file, long position, long count, boolean manageOsCache, int readaheadLength, ReadaheadPool readaheadPool, String identifier) throws IOException { this(file, position, count, manageOsCache, readaheadLength, readaheadPool, identifier, DEFAULT_SHUFFLE_BUFFER_SIZE, true); }
public FadvisedFileRegionWrapper(RandomAccessFile file, long position, long count, boolean manageOsCache, int readaheadLength, ReadaheadPool readaheadPool, String identifier) throws IOException { super(file, position, count, manageOsCache, readaheadLength, readaheadPool, identifier, DEFAULT_SHUFFLE_BUFFER_SIZE, true); }
public FadvisedFileRegionWrapper(RandomAccessFile file, long position, long count, boolean manageOsCache, int readaheadLength, ReadaheadPool readaheadPool, String identifier) throws IOException { super(file, position, count, manageOsCache, readaheadLength, readaheadPool, identifier); }