-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
135 changed files
with
13,130 additions
and
35,803 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* @akageun | ||
* @seungh0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
echo "Cassdio Build!! Start!!!!" | ||
|
||
./gradlew :cassdio-web:clean :cassdio-web:build -Pfrontend=true | ||
|
||
echo "Cassdio Build!! Complete!!!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
cassdio-core/src/main/java/kr/hakdang/cassdio/core/domain/BootstrapProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package kr.hakdang.cassdio.core.domain; | ||
|
||
import kr.hakdang.cassdio.core.domain.cluster.CassdioConsistencyLevel; | ||
import com.datastax.oss.driver.api.core.DefaultConsistencyLevel; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* BootstrapProvider | ||
* | ||
* @author akageun | ||
* @since 2024-07-30 | ||
*/ | ||
@Slf4j | ||
@Service | ||
public class BootstrapProvider { | ||
|
||
public Map<String, Object> consistencyLevels() { | ||
Map<String, Object> result = new HashMap<>(); | ||
result.put("consistencyLevels", CassdioConsistencyLevel.makeList(DefaultConsistencyLevel.values())); | ||
result.put("defaultConsistencyLevel", CassdioConsistencyLevel.make(DefaultConsistencyLevel.LOCAL_ONE)); //TODO : System Config | ||
|
||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...dto/response/CassdioConsistencyLevel.java → ...main/cluster/CassdioConsistencyLevel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
cassdio-core/src/main/java/kr/hakdang/cassdio/core/domain/cluster/CassdioVersionChecker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package kr.hakdang.cassdio.core.domain.cluster; | ||
|
||
import com.datastax.oss.driver.api.core.CqlSession; | ||
import com.datastax.oss.driver.api.core.Version; | ||
import kr.hakdang.cassdio.common.error.NotSupportedCassandraVersionException; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* CassdioVersionChecker | ||
* | ||
* @author seungh0 | ||
* @since 2024-07-31 | ||
*/ | ||
@Service | ||
public class CassdioVersionChecker { | ||
|
||
private static final Version MIN_SUPPORT_VERSION = Version.V3_0_0; | ||
|
||
private final ClusterVersionEvaluator clusterVersionEvaluator; | ||
private final ClusterConnector clusterConnector; | ||
|
||
public CassdioVersionChecker(ClusterVersionEvaluator clusterVersionEvaluator, ClusterConnector clusterConnector) { | ||
this.clusterVersionEvaluator = clusterVersionEvaluator; | ||
this.clusterConnector = clusterConnector; | ||
} | ||
|
||
public void verifyCompatibilityCassandraVersion(ClusterConnection connection) { | ||
try (CqlSession session = clusterConnector.makeSession(connection)) { | ||
if (clusterVersionEvaluator.isLessThan(session, MIN_SUPPORT_VERSION)) { | ||
throw new NotSupportedCassandraVersionException("Not supported cassandra with cluster version"); | ||
} | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.