From 40c73123c8f6a1bce533097f7d107a131835c474 Mon Sep 17 00:00:00 2001 From: hongsibao Date: Mon, 23 Mar 2015 00:52:22 +0800 Subject: [PATCH] Rename the variable 'contentAdressable' to 'contentAddressable' --- .../runtime/blob/BlobServerConnection.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServerConnection.java b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServerConnection.java index 0946d9803ad33..0f80b1704d196 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServerConnection.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServerConnection.java @@ -167,12 +167,12 @@ private void get(InputStream inputStream, OutputStream outputStream, byte[] buf) File blobFile; try { - final int contentAdressable = inputStream.read(); + final int contentAddressable = inputStream.read(); - if (contentAdressable < 0) { + if (contentAddressable < 0) { throw new EOFException("Premature end of GET request"); } - if (contentAdressable == NAME_ADDRESSABLE) { + if (contentAddressable == NAME_ADDRESSABLE) { // Receive the job ID and key byte[] jidBytes = new byte[JobID.SIZE]; readFully(inputStream, jidBytes, 0, JobID.SIZE, "JobID"); @@ -181,7 +181,7 @@ private void get(InputStream inputStream, OutputStream outputStream, byte[] buf) String key = readKey(buf, inputStream); blobFile = this.blobServer.getStorageLocation(jobID, key); } - else if (contentAdressable == CONTENT_ADDRESSABLE) { + else if (contentAddressable == CONTENT_ADDRESSABLE) { final BlobKey key = BlobKey.readFromInputStream(inputStream); blobFile = blobServer.getStorageLocation(key); } @@ -260,19 +260,19 @@ private void put(InputStream inputStream, OutputStream outputStream, byte[] buf) FileOutputStream fos = null; try { - final int contentAdressable = inputStream.read(); - if (contentAdressable < 0) { + final int contentAddressable = inputStream.read(); + if (contentAddressable < 0) { throw new EOFException("Premature end of PUT request"); } - if (contentAdressable == NAME_ADDRESSABLE) { + if (contentAddressable == NAME_ADDRESSABLE) { // Receive the job ID and key byte[] jidBytes = new byte[JobID.SIZE]; readFully(inputStream, jidBytes, 0, JobID.SIZE, "JobID"); jobID = JobID.fromByteArray(jidBytes); key = readKey(buf, inputStream); } - else if (contentAdressable == CONTENT_ADDRESSABLE) { + else if (contentAddressable == CONTENT_ADDRESSABLE) { md = BlobUtils.createMessageDigest(); } else { @@ -280,7 +280,7 @@ else if (contentAdressable == CONTENT_ADDRESSABLE) { } if (LOG.isDebugEnabled()) { - if (contentAdressable == NAME_ADDRESSABLE) { + if (contentAddressable == NAME_ADDRESSABLE) { LOG.debug(String.format("Received PUT request for BLOB under %s / \"%s\"", jobID, key)); } else { LOG.debug("Received PUT request for content addressable BLOB"); @@ -311,7 +311,7 @@ else if (contentAdressable == CONTENT_ADDRESSABLE) { fos.close(); fos = null; - if (contentAdressable == NAME_ADDRESSABLE) { + if (contentAddressable == NAME_ADDRESSABLE) { File storageFile = this.blobServer.getStorageLocation(jobID, key); if (!incomingFile.renameTo(storageFile)) { throw new IOException(String.format("Cannot move staging file %s to BLOB file %s",