mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
exception name refactoring
This commit is contained in:
parent
81195a7848
commit
8632af47c3
@ -61,7 +61,7 @@ public enum CQLExceptionEnum implements ResultReadable {
|
|||||||
ResultSetVerificationException(io.nosqlbench.activitytype.cql.errorhandling.exceptions.ResultSetVerificationException.class, 39),
|
ResultSetVerificationException(io.nosqlbench.activitytype.cql.errorhandling.exceptions.ResultSetVerificationException.class, 39),
|
||||||
RowVerificationException(io.nosqlbench.activitytype.cql.errorhandling.exceptions.RowVerificationException.class, 40),
|
RowVerificationException(io.nosqlbench.activitytype.cql.errorhandling.exceptions.RowVerificationException.class, 40),
|
||||||
UnexpectedPagingException(io.nosqlbench.activitytype.cql.errorhandling.exceptions.UnexpectedPagingException.class, 41),
|
UnexpectedPagingException(io.nosqlbench.activitytype.cql.errorhandling.exceptions.UnexpectedPagingException.class, 41),
|
||||||
EbdseCycleException(CqlCycleException.class, 42),
|
EbdseCycleException(CqlGenericCycleException.class, 42),
|
||||||
MaxTriesExhaustedException(io.nosqlbench.activitytype.cql.errorhandling.exceptions.MaxTriesExhaustedException.class,43);
|
MaxTriesExhaustedException(io.nosqlbench.activitytype.cql.errorhandling.exceptions.MaxTriesExhaustedException.class,43);
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(CQLExceptionEnum.class);
|
private final static Logger logger = LoggerFactory.getLogger(CQLExceptionEnum.class);
|
||||||
|
@ -53,11 +53,11 @@ public class ExceptionMap {
|
|||||||
put(UnsupportedFeatureException.class, DriverException.class);
|
put(UnsupportedFeatureException.class, DriverException.class);
|
||||||
put(BusyConnectionException.class, DriverException.class);
|
put(BusyConnectionException.class, DriverException.class);
|
||||||
|
|
||||||
put(ChangeUnappliedCycleException.class, CqlCycleException.class);
|
put(ChangeUnappliedCycleException.class, CqlGenericCycleException.class);
|
||||||
put(ResultSetVerificationException.class, CqlCycleException.class);
|
put(ResultSetVerificationException.class, CqlGenericCycleException.class);
|
||||||
put(RowVerificationException.class, CqlCycleException.class);
|
put(RowVerificationException.class, CqlGenericCycleException.class);
|
||||||
put(UnexpectedPagingException.class, CqlCycleException.class);
|
put(UnexpectedPagingException.class, CqlGenericCycleException.class);
|
||||||
put(CqlCycleException.class, RuntimeException.class);
|
put(CqlGenericCycleException.class, RuntimeException.class);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import com.datastax.driver.core.ResultSet;
|
|||||||
import com.datastax.driver.core.SimpleStatement;
|
import com.datastax.driver.core.SimpleStatement;
|
||||||
import com.datastax.driver.core.Statement;
|
import com.datastax.driver.core.Statement;
|
||||||
|
|
||||||
public abstract class CQLResultSetException extends CqlCycleException {
|
public abstract class CQLResultSetException extends CqlGenericCycleException {
|
||||||
|
|
||||||
private final Statement statement;
|
private final Statement statement;
|
||||||
private final ResultSet resultSet;
|
private final ResultSet resultSet;
|
||||||
|
@ -8,7 +8,7 @@ import com.datastax.driver.core.ResultSet;
|
|||||||
* to respond to different result outcomes, it
|
* to respond to different result outcomes, it
|
||||||
* is just simpler to have a single type of error-handling logic for all outcomes.
|
* is just simpler to have a single type of error-handling logic for all outcomes.
|
||||||
*/
|
*/
|
||||||
public class ChangeUnappliedCycleException extends CqlCycleException {
|
public class ChangeUnappliedCycleException extends CqlGenericCycleException {
|
||||||
|
|
||||||
private final ResultSet resultSet;
|
private final ResultSet resultSet;
|
||||||
private final String queryString;
|
private final String queryString;
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
package io.nosqlbench.activitytype.cql.errorhandling.exceptions;
|
package io.nosqlbench.activitytype.cql.errorhandling.exceptions;
|
||||||
|
|
||||||
public abstract class CqlCycleException extends RuntimeException {
|
public abstract class CqlGenericCycleException extends RuntimeException {
|
||||||
|
|
||||||
private long cycle;
|
private long cycle;
|
||||||
|
|
||||||
public CqlCycleException(long cycle, Throwable cause) {
|
public CqlGenericCycleException(long cycle, Throwable cause) {
|
||||||
super(cause);
|
super(cause);
|
||||||
this.cycle = cycle;
|
this.cycle = cycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CqlCycleException(long cycle, String message) {
|
public CqlGenericCycleException(long cycle, String message) {
|
||||||
super(message);
|
super(message);
|
||||||
this.cycle = cycle;
|
this.cycle = cycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CqlCycleException(long cycle, String message, Throwable cause) {
|
public CqlGenericCycleException(long cycle, String message, Throwable cause) {
|
||||||
super(message, cause);
|
super(message, cause);
|
||||||
this.cycle = cycle;
|
this.cycle = cycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CqlCycleException(long cycle) {
|
public CqlGenericCycleException(long cycle) {
|
||||||
super();
|
super();
|
||||||
this.cycle = cycle;
|
this.cycle = cycle;
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
package io.nosqlbench.activitytype.cql.errorhandling.exceptions;
|
package io.nosqlbench.activitytype.cql.errorhandling.exceptions;
|
||||||
|
|
||||||
public class MaxTriesExhaustedException extends CqlCycleException {
|
public class MaxTriesExhaustedException extends CqlGenericCycleException {
|
||||||
|
|
||||||
private int maxtries;
|
private int maxtries;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* This exception is thrown when read verification fails.
|
* This exception is thrown when read verification fails.
|
||||||
*/
|
*/
|
||||||
public class RowVerificationException extends CqlCycleException {
|
public class RowVerificationException extends CqlGenericCycleException {
|
||||||
|
|
||||||
private Map<String, Object> expected;
|
private Map<String, Object> expected;
|
||||||
private Row row;
|
private Row row;
|
||||||
|
@ -17,7 +17,7 @@ import com.datastax.driver.core.ResultSet;
|
|||||||
* fetchsize or maxpages in order to open up paging to the degree that is allowable or
|
* fetchsize or maxpages in order to open up paging to the degree that is allowable or
|
||||||
* expected.
|
* expected.
|
||||||
*/
|
*/
|
||||||
public class UnexpectedPagingException extends CqlCycleException {
|
public class UnexpectedPagingException extends CqlGenericCycleException {
|
||||||
|
|
||||||
private final ResultSet resultSet;
|
private final ResultSet resultSet;
|
||||||
private final String queryString;
|
private final String queryString;
|
||||||
|
Loading…
Reference in New Issue
Block a user