HBASE-10519 Add handling for swallowed InterruptedException thrown by Thread.sleep in rest related files (Feng Honghua)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1570217 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2476afbcb2
commit
65fa5c4d82
|
@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.rest.client;
|
|||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
@ -130,6 +131,7 @@ public class RemoteAdmin {
|
|||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -171,6 +173,7 @@ public class RemoteAdmin {
|
|||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -219,6 +222,7 @@ public class RemoteAdmin {
|
|||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -256,7 +260,9 @@ public class RemoteAdmin {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("get request to " + path.toString() + " returned " + code);
|
||||
|
@ -293,7 +299,9 @@ public class RemoteAdmin {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("create request to " + path.toString() + " returned " + code);
|
||||
|
@ -336,7 +344,9 @@ public class RemoteAdmin {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("delete request to " + path.toString() + " returned " + code);
|
||||
|
@ -377,6 +387,7 @@ public class RemoteAdmin {
|
|||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
package org.apache.hadoop.hbase.rest.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
@ -268,7 +269,9 @@ public class RemoteHTable implements HTableInterface {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("schema request returned " + code);
|
||||
|
@ -344,7 +347,9 @@ public class RemoteHTable implements HTableInterface {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("get request returned " + code);
|
||||
|
@ -389,7 +394,9 @@ public class RemoteHTable implements HTableInterface {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("put request failed with " + code);
|
||||
|
@ -443,7 +450,9 @@ public class RemoteHTable implements HTableInterface {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("multiput request failed with " + code);
|
||||
|
@ -464,7 +473,9 @@ public class RemoteHTable implements HTableInterface {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("delete request failed with " + code);
|
||||
|
@ -510,7 +521,9 @@ public class RemoteHTable implements HTableInterface {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("scan request failed with " + code);
|
||||
|
@ -539,7 +552,9 @@ public class RemoteHTable implements HTableInterface {
|
|||
case 509:
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new IOException("scanner.next request failed with " + code);
|
||||
|
@ -660,6 +675,7 @@ public class RemoteHTable implements HTableInterface {
|
|||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (final InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -700,6 +716,7 @@ public class RemoteHTable implements HTableInterface {
|
|||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (final InterruptedException e) {
|
||||
throw (InterruptedIOException)new InterruptedIOException().initCause(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue