@Override public void read(final DataInput in) throws IOException { super.read(in); // Read path of the input file final boolean isNotNull = in.readBoolean(); if (isNotNull) { this.path = new Path(); this.path.read(in); } }
@Override public void read(final DataInput in) throws IOException { super.read(in); // Read path of the input file boolean isNotNull = in.readBoolean(); if (isNotNull) { this.path = new Path(); this.path.read(in); } }
@Override public void read(final DataInput in) throws IOException { super.read(in); // Read path of the input file final boolean isNotNull = in.readBoolean(); if (isNotNull) { this.path = new Path(); this.path.read(in); } }
@Override public void read(final DataInput in) throws IOException { super.read(in); // Read path of the input file boolean isNotNull = in.readBoolean(); if (isNotNull) { this.path = new Path(); this.path.read(in); } }
@Override public void read(final DataInput in) throws IOException { // read partition number this.partitionNumber = in.readInt(); // read file path boolean isNotNull = in.readBoolean(); if (isNotNull) { this.file = new Path(); this.file.read(in); } this.start = in.readLong(); this.length = in.readLong(); isNotNull = in.readBoolean(); if (isNotNull) { final int numHosts = in.readInt(); this.hosts = new String[numHosts]; for (int i = 0; i < numHosts; i++) { this.hosts[i] = StringRecord.readString(in); } } else { this.hosts = null; } } }
@Override public void read(final DataInput in) throws IOException { // read partition number this.partitionNumber = in.readInt(); // read file path boolean isNotNull = in.readBoolean(); if (isNotNull) { this.file = new Path(); this.file.read(in); } this.start = in.readLong(); this.length = in.readLong(); isNotNull = in.readBoolean(); if (isNotNull) { final int numHosts = in.readInt(); this.hosts = new String[numHosts]; for (int i = 0; i < numHosts; i++) { this.hosts[i] = StringRecord.readString(in); } } else { this.hosts = null; } } }
/** * Reads required JAR files from an input stream and adds them to the * library cache manager. * * @param in * the data stream to read the JAR files from * @throws IOException * thrown if an error occurs while reading the stream */ private void readRequiredJarFiles(final DataInput in) throws IOException { // Do jar files follow; final int numJars = in.readInt(); if (numJars > 0) { for (int i = 0; i < numJars; i++) { final Path p = new Path(); p.read(in); this.userJars.add(p); // Read the size of the jar file final long sizeOfJar = in.readLong(); // Add the jar to the library manager LibraryCacheManager.addLibrary(this.jobID, p, sizeOfJar, in); } } // Register this job with the library cache manager LibraryCacheManager.register(this.jobID, this.userJars.toArray(new Path[0])); }
/** * Reads required JAR files from an input stream and adds them to the * library cache manager. * * @param in * the data stream to read the JAR files from * @throws IOException * thrown if an error occurs while reading the stream */ private void readRequiredJarFiles(final DataInput in) throws IOException { // Do jar files follow; final int numJars = in.readInt(); if (numJars > 0) { for (int i = 0; i < numJars; i++) { final Path p = new Path(); p.read(in); this.userJars.add(p); // Read the size of the jar file final long sizeOfJar = in.readLong(); // Add the jar to the library manager LibraryCacheManager.addLibrary(this.jobID, p, sizeOfJar, in); } } // Register this job with the library cache manager LibraryCacheManager.register(this.jobID, this.userJars.toArray(new Path[0])); }