org.apache.hadoop.fs.swift.exceptions.SwiftConnectionClosedException Java Examples

The following examples show how to use org.apache.hadoop.fs.swift.exceptions.SwiftConnectionClosedException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StrictBufferedFSInputStream.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public void seek(long pos) throws IOException {
  if (pos < 0) {
    throw new EOFException(FSExceptionMessages.NEGATIVE_SEEK);
  }
  if (in == null) {
    throw new SwiftConnectionClosedException(FSExceptionMessages.STREAM_IS_CLOSED);
  }
  super.seek(pos);
}
 
Example #2
Source File: StrictBufferedFSInputStream.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public void seek(long pos) throws IOException {
  if (pos < 0) {
    throw new EOFException(FSExceptionMessages.NEGATIVE_SEEK);
  }
  if (in == null) {
    throw new SwiftConnectionClosedException(FSExceptionMessages.STREAM_IS_CLOSED);
  }
  super.seek(pos);
}
 
Example #3
Source File: StrictBufferedFSInputStream.java    From sahara-extra with Apache License 2.0 5 votes vote down vote up
@Override
public void seek(long pos) throws IOException {
  if (pos < 0) {
    throw new IOException("Negative position");
  }
  if (in == null) {
    throw new SwiftConnectionClosedException("Stream closed");
  }
  super.seek(pos);
}
 
Example #4
Source File: HttpInputStreamWithRelease.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * Assume that the connection is not released: throws an exception if it is
 * @throws SwiftConnectionClosedException
 */
private synchronized void assumeNotReleased() throws SwiftConnectionClosedException {
  if (released || inStream == null) {
    throw new SwiftConnectionClosedException(reasonClosed);
  }
}
 
Example #5
Source File: SwiftNativeOutputStream.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * check that the output stream is open
 *
 * @throws SwiftException if it is not
 */
private synchronized void verifyOpen() throws SwiftException {
  if (closed) {
    throw new SwiftConnectionClosedException();
  }
}
 
Example #6
Source File: SwiftNativeInputStream.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * Assume that the connection is not closed: throws an exception if it is
 * @throws SwiftConnectionClosedException
 */
private void verifyOpen() throws SwiftConnectionClosedException {
  if (httpStream == null) {
    throw new SwiftConnectionClosedException(reasonClosed);
  }
}
 
Example #7
Source File: HttpInputStreamWithRelease.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * Assume that the connection is not released: throws an exception if it is
 * @throws SwiftConnectionClosedException
 */
private synchronized void assumeNotReleased() throws SwiftConnectionClosedException {
  if (released || inStream == null) {
    throw new SwiftConnectionClosedException(reasonClosed);
  }
}
 
Example #8
Source File: SwiftNativeOutputStream.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * check that the output stream is open
 *
 * @throws SwiftException if it is not
 */
private synchronized void verifyOpen() throws SwiftException {
  if (closed) {
    throw new SwiftConnectionClosedException();
  }
}
 
Example #9
Source File: SwiftNativeInputStream.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * Assume that the connection is not closed: throws an exception if it is
 * @throws SwiftConnectionClosedException
 */
private void verifyOpen() throws SwiftConnectionClosedException {
  if (httpStream == null) {
    throw new SwiftConnectionClosedException(reasonClosed);
  }
}
 
Example #10
Source File: HttpInputStreamWithRelease.java    From sahara-extra with Apache License 2.0 4 votes vote down vote up
/**
 * Assume that the connection is not released: throws an exception if it is
 * @throws SwiftConnectionClosedException
 */
private synchronized void assumeNotReleased() throws SwiftConnectionClosedException {
  if (released || inStream == null) {
    throw new SwiftConnectionClosedException(reasonClosed);
  }
}
 
Example #11
Source File: SwiftNativeInputStream.java    From sahara-extra with Apache License 2.0 4 votes vote down vote up
/**
 * Assume that the connection is not closed: throws an exception if it is
 * @throws SwiftConnectionClosedException
 */
private void verifyOpen() throws SwiftConnectionClosedException {
  if (httpStream == null) {
    throw new SwiftConnectionClosedException(reasonClosed);
  }
}