Compare commits
13 Commits
master
...
branch-1.0
Author | SHA1 | Date | |
---|---|---|---|
|
79865c2d2e | ||
|
4fdec13281 | ||
|
0732b76b33 | ||
|
955dc16a31 | ||
|
3d39ece41f | ||
|
295f925860 | ||
|
f014f82630 | ||
|
11e5421d4b | ||
|
46286836e4 | ||
|
ed493ef1d1 | ||
|
080042318e | ||
|
9718d87e80 | ||
|
9c9d879a48 |
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
VERSION=666.development
|
||||
VERSION=1.0.4
|
||||
|
||||
if test -f version
|
||||
then
|
||||
|
2
dist/ubuntu/build_deb.sh
vendored
2
dist/ubuntu/build_deb.sh
vendored
@ -10,7 +10,7 @@ if [ -e debian ] || [ -e build ] || [ -e target ] || [ -e m2 ] || [ -e dependenc
|
||||
fi
|
||||
|
||||
VERSION=$(./SCYLLA-VERSION-GEN)
|
||||
SCYLLA_VERSION=$(cat build/SCYLLA-VERSION-FILE)
|
||||
SCYLLA_VERSION=$(cat build/SCYLLA-VERSION-FILE | sed 's/\.rc/~rc/')
|
||||
SCYLLA_RELEASE=$(cat build/SCYLLA-RELEASE-FILE)
|
||||
if [ "$SCYLLA_VERSION" = "development" ]; then
|
||||
SCYLLA_VERSION=0development
|
||||
|
3
dist/ubuntu/debian/rules
vendored
3
dist/ubuntu/debian/rules
vendored
@ -23,5 +23,8 @@ override_dh_auto_install:
|
||||
cp $(CURDIR)/scripts/scylla-jmx $(DEST)
|
||||
cp $(CURDIR)/target/scylla-jmx-1.0.jar $(DEST)
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit --no-start
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
@ -100,7 +100,7 @@ public class APIClient {
|
||||
public Response post(String path, MultivaluedMap<String, String> queryParams) {
|
||||
Response response = get(path, queryParams).post(Entity.entity(null, MediaType.TEXT_PLAIN));
|
||||
if (response.getStatus() != Response.Status.OK.getStatusCode() ) {
|
||||
throw getException(response.readEntity(String.class));
|
||||
throw getException("Scylla API server HTTP POST to URL '" + path + "' failed", response.readEntity(String.class));
|
||||
}
|
||||
return response;
|
||||
|
||||
@ -110,10 +110,10 @@ public class APIClient {
|
||||
post(path, null);
|
||||
}
|
||||
|
||||
public RuntimeException getException(String txt) {
|
||||
JsonReader reader = factory.createReader(new StringReader(txt));
|
||||
public IllegalStateException getException(String msg, String json) {
|
||||
JsonReader reader = factory.createReader(new StringReader(json));
|
||||
JsonObject res = reader.readObject();
|
||||
return new RuntimeException(res.getString("message"));
|
||||
return new IllegalStateException(msg + ": " + res.getString("message"));
|
||||
}
|
||||
|
||||
public String postGetVal(String path, MultivaluedMap<String, String> queryParams) {
|
||||
@ -157,7 +157,7 @@ public class APIClient {
|
||||
// TBD
|
||||
// We are currently not caching errors,
|
||||
// it should be reconsider.
|
||||
throw getException(response.readEntity(String.class));
|
||||
throw getException("Scylla API server HTTP GET to URL '" + string + "' failed", response.readEntity(String.class));
|
||||
}
|
||||
res = response.readEntity(String.class);
|
||||
if (duration > 0) {
|
||||
|
@ -132,14 +132,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
}
|
||||
}
|
||||
missed_response = 0;
|
||||
} catch (ProcessingException e) {
|
||||
if (Throwables.getRootCause(e) instanceof ConnectException) {
|
||||
if (missed_response++ > MAX_RETRY) {
|
||||
System.err.println("API is not available, JMX is shuting down");
|
||||
System.exit(-1);
|
||||
}
|
||||
} else {
|
||||
// ignoring exceptions, will retry on the next interval
|
||||
} catch (IllegalStateException e) {
|
||||
if (missed_response++ > MAX_RETRY) {
|
||||
System.err.println("API is not available, JMX is shuting down");
|
||||
System.exit(-1);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// ignoring exceptions, will retry on the next interval
|
||||
|
@ -138,7 +138,7 @@ public final class MessagingService implements MessagingServiceMBean {
|
||||
}
|
||||
connection_failure = 0;
|
||||
report_error = 1;
|
||||
} catch (ProcessingException e) {
|
||||
} catch (IllegalStateException e) {
|
||||
// Connection problem, No need to do anything, just retry.
|
||||
} catch (Exception e) {
|
||||
connection_failure++;
|
||||
|
@ -549,6 +549,15 @@ public class StorageService extends NotificationBroadcasterSupport
|
||||
String keyspaceName, String... columnFamilies) throws IOException,
|
||||
ExecutionException, InterruptedException {
|
||||
log(" scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException");
|
||||
return scrub(disableSnapshot, skipCorrupted, true, keyspaceName, columnFamilies);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scrub(boolean disableSnapshot, boolean skipCorrupted,
|
||||
boolean checkData, String keyspaceName, String... columnFamilies)
|
||||
throws IOException, ExecutionException,
|
||||
InterruptedException {
|
||||
log(" scrub(boolean disableSnapshot, boolean skipCorrupted, bool checkData, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException");
|
||||
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
||||
APIClient.set_bool_query_param(queryParams, "disable_snapshot",
|
||||
disableSnapshot);
|
||||
@ -1281,16 +1290,6 @@ public class StorageService extends NotificationBroadcasterSupport
|
||||
log(" takeMultipleColumnFamilySnapshot");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int scrub(boolean disableSnapshot, boolean skipCorrupted,
|
||||
boolean checkData, String keyspaceName, String... columnFamilies)
|
||||
throws IOException, ExecutionException,
|
||||
InterruptedException {
|
||||
// TODO Auto-generated method stub
|
||||
log(" scrub()");
|
||||
return c.getIntValue("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int forceRepairAsync(String keyspace, int parallelismDegree,
|
||||
Collection<String> dataCenters, Collection<String> hosts,
|
||||
|
Loading…
x
Reference in New Issue
Block a user