Skip to content

Commit 70f207a

Browse files
committed
Tidying up from various merges
1 parent d9df9ab commit 70f207a

File tree

4 files changed

+4
-36
lines changed

4 files changed

+4
-36
lines changed

SIT/test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,3 @@ echo
151151
echo "=========================================================="
152152
echo " Phase ${PHASE} Complete"
153153
echo "=========================================================="
154-

src/main/java/datastax/astra/migrate/AbstractJobSession.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ protected AbstractJobSession(CqlSession originSession, CqlSession targetSession,
2929
printStatsAfter = propertyHelper.getInteger(KnownProperties.SPARK_STATS_AFTER);
3030
if (!propertyHelper.meetsMinimum(KnownProperties.SPARK_STATS_AFTER, printStatsAfter, 1)) {
3131
logger.warn(KnownProperties.SPARK_STATS_AFTER +" must be greater than 0. Setting to default value of " + KnownProperties.getDefaultAsString(KnownProperties.SPARK_STATS_AFTER));
32-
propertyHelper.setProperty(KnownProperties.SPARK_STATS_AFTER, KnownProperties.getDefaultAsString(KnownProperties.SPARK_STATS_AFTER));
32+
propertyHelper.setProperty(KnownProperties.SPARK_STATS_AFTER, KnownProperties.getDefault(KnownProperties.SPARK_STATS_AFTER));
33+
printStatsAfter = propertyHelper.getInteger(KnownProperties.SPARK_STATS_AFTER);
3334
}
3435

3536
readLimiter = RateLimiter.create(propertyHelper.getInteger(KnownProperties.SPARK_LIMIT_READ));

src/main/java/datastax/astra/migrate/CopyPKJobSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public class CopyPKJobSession extends AbstractJobSession {
2121
protected AtomicLong missingCounter = new AtomicLong(0);
2222
protected AtomicLong writeCounter = new AtomicLong(0);
2323

24-
protected CopyPKJobSession(CqlSession originSessionSession, CqlSession targetSession, SparkConf sc) {
25-
super(originSessionSession, targetSession, sc, true);
24+
protected CopyPKJobSession(CqlSession originSession, CqlSession targetSession, SparkConf sc) {
25+
super(originSession, targetSession, sc, true);
2626
}
2727

2828
public static CopyPKJobSession getInstance(CqlSession originSession, CqlSession targetSession, SparkConf sc) {

src/main/java/datastax/astra/migrate/MigrateDataType.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public class MigrateDataType {
2020
private static int minType = 0;
2121
private static int maxType = 19;
2222

23-
private static final List<Class> COLLECTION_TYPES = Arrays.asList(List.class, Set.class, Map.class);
24-
2523
public MigrateDataType(String dataType) {
2624
dataTypeString = dataType;
2725
if (dataType.contains("%")) {
@@ -40,32 +38,6 @@ public MigrateDataType(String dataType) {
4038
}
4139
this.typeClass = getType(this.type);
4240

43-
if (this.type >= minType && this.type <= maxType) {
44-
isValid = true;
45-
for (Object o : subTypes) {
46-
if (null == o || Object.class == o) {
47-
isValid = false;
48-
}
49-
}
50-
}
51-
else {
52-
isValid = false;
53-
}
54-
this.typeClass = getType(this.type);
55-
56-
if (this.type >= minType && this.type <= maxType) {
57-
isValid = true;
58-
for (Object o : subTypes) {
59-
if (null == o || Object.class == o) {
60-
isValid = false;
61-
}
62-
}
63-
}
64-
else {
65-
isValid = false;
66-
}
67-
this.typeClass = getType(this.type);
68-
6941
if (this.type >= minType && this.type <= maxType) {
7042
isValid = true;
7143
for (Object o : subTypes) {
@@ -148,10 +120,6 @@ private Class getType(int type) {
148120
return Object.class;
149121
}
150122

151-
public boolean isCollection() {
152-
return COLLECTION_TYPES.contains(typeClass);
153-
}
154-
155123
public Class getType() {
156124
return this.typeClass;
157125
}

0 commit comments

Comments
 (0)