Java version of CDM
Cassandra Dataset Manager
pmcfadin/killrvideo-sentiment-example 5
Example data and code to show sentiment analysis using Apache Spark on Apache Cassandra
Tool to quickly and easily test rest apis
CQL Parser written in Rust.
rustyrazorblade/golang-sample-binary-read-write 2
Simple go binary reader and writer. Learning tool only.
Persistence layer for redis data types
rustyrazorblade/commitlog-viz 1
Commitlog visualization tool for apache cassandra
startedarrow-kt/arrow
started time in 2 months
startedkarlsabo/packr
started time in 2 months
PR merged apache/cassandra-sidecar
CASSANDRASC-23
pr closed time in 3 months
push eventapache/cassandra-sidecar
commit sha a4805a910904019698ae373ac33f88855cf67f3d
Support for multiple Cassandra versions This patch lays the groundwork to support multiple Cassandra versions. New submodules were created for common libraries as well as specific Cassandra versions. Several dependencies are moved to the common submodule due to their universal nature. Most importantly, this patch introduces Junit Test Template for testing multiple Cassandra versions. Test should be annotated with a @CassandraIntegrationTest. These tests require Docker and Kubernetes be available. A single version is currently supported, 4.0. A dockerfile sets up the image from the beta tarball and initializes the session. Cassandra driver was upgraded to version 3.9, previous versions errored with Java 11. CircleCI tests are run using microk8s. Patch by Jon Haddad; Reviewed by Dinesh Joshi for CASSANDRASC-23
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha a4805a910904019698ae373ac33f88855cf67f3d
Support for multiple Cassandra versions This patch lays the groundwork to support multiple Cassandra versions. New submodules were created for common libraries as well as specific Cassandra versions. Several dependencies are moved to the common submodule due to their universal nature. Most importantly, this patch introduces Junit Test Template for testing multiple Cassandra versions. Test should be annotated with a @CassandraIntegrationTest. These tests require Docker and Kubernetes be available. A single version is currently supported, 4.0. A dockerfile sets up the image from the beta tarball and initializes the session. Cassandra driver was upgraded to version 3.9, previous versions errored with Java 11. CircleCI tests are run using microk8s. Patch by Jon Haddad; Reviewed by Dinesh Joshi for CASSANDRASC-23
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha fc209c32a6d200ca78a3979dee0dc0dfbae9f5b4
Support for multiple Cassandra versions This patch lays the groundwork to support multiple Cassandra versions. New submodules were created for common libraries as well as specific Cassandra versions. Several dependencies are moved to the common submodule due to their universal nature. Most importantly, this patch introduces Junit Test Template for testing multiple Cassandra versions. Test should be annotated with a @CassandraIntegrationTest. These tests require Docker and Kubernetes be available. A single version is currently supported, 4.0. A dockerfile sets up the image from the beta tarball and initializes the session. Cassandra driver was upgraded to version 3.9, previous versions errored with Java 11. CircleCI tests are run using microk8s. Patch by Jon Haddad; Reviewed by Dinesh Joshi for CASSANDRASC-23
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha d83259ba4a20c97e8a8cd7b9ac645371e726fafd
Support for multiple Cassandra versions This patch lays the groundwork to support multiple Cassandra versions. New submodules were created for common libraries as well as specific Cassandra versions. Several dependencies are moved to the common submodule due to their universal nature. Most importantly, this patch introduces Junit Test Template for testing multiple Cassandra versions. Test should be annotated with a @CassandraIntegrationTest. These tests require Docker and Kubernetes be available. A single version is currently supported, 4.0. A dockerfile sets up the image from the alpha tarball and initializes the session. Cassandra driver was upgraded to version 3.9, previous versions errored with Java 11. Add SSL settings into test from build.gradle to make them work in intellij in addition to from the command line. CircleCI tests are run using microk8s. Patch by Jon Haddad; Reviewed by Dinesh Joshi for CASSANDRASC-23
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha 6970dc0587bdce16e2f6438a9dc3e4fc5422e2d6
minor tweaks to deal with slow startup
commit sha 5cddb7fa6fdc513d6c77d36ece67108d0f72ed4d
minor tweak
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha c309bbf856694d99d1837c0d25ce1446131c7a36
fixed common tests not being run
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha 2f364fc200c0ff15e5ff1f520aa0901e7dc7764d
integration test results
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha c0907286d685537833d4c967555c0e52f33238a2
fixes for checkstyle
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha a5813ebd24c341ff5dc1da00a5a9a7d095086969
Removed the extra bit
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha 153ccfccceae7fae09116b7cf13f561def761881
Support for multiple Cassandra versions This patch lays the groundwork to support multiple Cassandra versions. New submodules were created for common libraries as well as specific Cassandra versions. Several dependencies are moved to the common submodule due to their universal nature. Most importantly, this patch introduces Junit Test Template for testing multiple Cassandra versions. Test should be annotated with a @CassandraIntegrationTest. These tests require Docker and Kubernetes be available. A single version is currently supported, 4.0. A dockerfile sets up the image from the alpha tarball and initializes the session. Cassandra driver was upgraded to version 3.9, previous versions errored with Java 11. Add SSL settings into test from build.gradle to make them work in intellij in addition to from the command line. CircleCI tests are run using microk8s. Patch by Jon Haddad; Reviewed by Dinesh Joshi for CASSANDRASC-23
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha bdce316c50fc4fdebeeadac56c5bea7b0122a37e
improving doc on SimplifiedCassandraVersion
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha 43808acfb93dfda498c0e6b95b38c13d4ee8ae3b
addressing nits
commit sha 9775d2a59105d5c91cbdfae4d03c502476b86851
removed check kube script
push time in 3 months
Pull request review commentapache/cassandra-sidecar
Jon/23/multiple cassandra versions
+/*+ * Licensed to the Apache Software Foundation (ASF) under one+ * or more contributor license agreements. See the NOTICE file+ * distributed with this work for additional information+ * regarding copyright ownership. The ASF licenses this file+ * to you under the Apache License, Version 2.0 (the+ * "License"); you may not use this file except in compliance+ * with the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package org.apache.cassandra.sidecar.common.testing;++import java.io.IOException;+import java.net.URI;+import java.util.ArrayList;+import java.util.Collections;+import java.util.HashMap;+import java.util.List;+import java.util.UUID;+import java.util.concurrent.TimeUnit;++import org.slf4j.Logger;+import org.slf4j.LoggerFactory;++import io.kubernetes.client.Exec;++import io.kubernetes.client.openapi.ApiClient;+import io.kubernetes.client.openapi.ApiException;+import io.kubernetes.client.openapi.Configuration;++import io.kubernetes.client.openapi.apis.CoreV1Api;+import io.kubernetes.client.openapi.models.V1ContainerPort;+import io.kubernetes.client.openapi.models.V1Pod;+import io.kubernetes.client.openapi.models.V1PodBuilder;+import io.kubernetes.client.openapi.models.V1Service;+import io.kubernetes.client.openapi.models.V1ServiceBuilder;+import io.kubernetes.client.openapi.models.V1ServicePort;+import io.kubernetes.client.openapi.models.V1ServiceSpec;++import io.kubernetes.client.util.ClientBuilder;+import okhttp3.OkHttpClient;+import okhttp3.Protocol;+import okhttp3.internal.Util;++/**+ * Manages a single instance of a Cassandra container+ */+class CassandraPod+{+ private final URI dockerRegistry;+ private final String image;+ private final String namespace;+ private final String dockerGroup;+ private static final Logger logger = LoggerFactory.getLogger(CassandraPod.class);+ private final String podName;++ private final CoreV1Api coreV1Api;+ private Boolean deleted = false;++ String ip;+ Integer port;++ public CassandraPod(URI dockerRegistry, String dockerGroup, String image, String namespace, CoreV1Api coreV1Api)+ {+ this.dockerRegistry = dockerRegistry;+ this.image = image;+ this.namespace = namespace;+ this.dockerGroup = dockerGroup;+ this.podName = String.format("cassandra-%s", UUID.randomUUID());+ this.coreV1Api = coreV1Api;+ }++ /**+ * Creates a single pod using the system properties passed in through Gradle+ * @param image+ * @return+ * @throws Exception+ */+ public static CassandraPod createFromProperties(String image) throws Exception+ {+ URI dockerRegistry = new URI(System.getProperty("sidecar.dockerRegistry"));+ String namespace = System.getProperty("sidecar.kubernetesNamespace");+ String dockerGroup = System.getProperty("sidecar.dockerGroup");++ logger.info("Creating pod from registry {}, namespace {}, group {}", dockerRegistry, namespace, dockerGroup);++ if (dockerRegistry == null)+ {+ throw new Exception("Docker registry required but sidecar.dockerRegistry = null");+ }+ if (namespace == null)+ {+ throw new Exception("sidecar.kubernetesNamespace is not defined and is required for K8 testing");+ }++ ApiClient apiClient = ClientBuilder.standard().build();++ // this is a workaround for socket errors that show up in certain JVM versions...+ // without it, the tests fail in CI.+ // we can probably get rid of this when we either move to JDK 11 only or if the Kubernetes clienti s updated+ OkHttpClient httpClient =+ apiClient.getHttpClient().newBuilder()+ .protocols(Util.immutableList(Protocol.HTTP_1_1))+ .readTimeout(10, TimeUnit.SECONDS)+ .writeTimeout(10, TimeUnit.SECONDS)+ .connectTimeout(10, TimeUnit.SECONDS)+ .callTimeout(10, TimeUnit.SECONDS)+ .retryOnConnectionFailure(true)+ .build();+ apiClient.setHttpClient(httpClient);++ Configuration.setDefaultApiClient(apiClient);++ logger.info("K8 client: {}", apiClient.getBasePath());++ CoreV1Api coreV1Api = new CoreV1Api(apiClient);+++ return new CassandraPod(dockerRegistry, dockerGroup, image, namespace, coreV1Api);+ }++ public void start() throws ApiException, InterruptedException, CassandraPodException+ {+ // create a v1 deployment spec+ String fullImage = getFullImageName();++ // similar to the spec yaml file, just programmatic++ HashMap<String, String> labels = getLabels();++ V1Service serviceBuilder = getService();++ logger.debug("Exposing service with: {}", serviceBuilder.toString());++ try+ {+ coreV1Api.createNamespacedService(namespace, serviceBuilder, null, null, null);+ }+ catch (ApiException e)+ {+ logger.error("Unable to create namespaced service: {}", e.getMessage());+ throw e;+ }++ // get the service+ V1Service namespacedService = coreV1Api.readNamespacedService(podName, namespace, null, null, null);+ logger.debug("Service result: {}", namespacedService);++ V1ServiceSpec serviceSpec = namespacedService.getSpec();++ logger.info("Starting container {}", fullImage);+ V1Pod pod = getPod(fullImage, labels);++ logger.debug("Pod spec: {}", pod);+ V1Pod podResult = coreV1Api.createNamespacedPod(namespace, pod, null, null, null);+ logger.debug("Pod result: {}", podResult);++ int maxTime = 30;+ V1Pod namespacedPod = null;+ Boolean started = false;+ String response = "";++ for (int i = 0; i < maxTime; i++)+ {+ // we sleep in the beginning because the pod will never be ready right away+ // sometimes K8 seems to hang in CI as well, so this might be enough to let the pod start+ try+ {+ Thread.sleep(1000);
Will do
comment created time in 3 months
Pull request review commentapache/cassandra-sidecar
Jon/23/multiple cassandra versions
+/*+ * Licensed to the Apache Software Foundation (ASF) under one+ * or more contributor license agreements. See the NOTICE file+ * distributed with this work for additional information+ * regarding copyright ownership. The ASF licenses this file+ * to you under the Apache License, Version 2.0 (the+ * "License"); you may not use this file except in compliance+ * with the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package org.apache.cassandra.sidecar.common;++import java.util.List;+import java.util.concurrent.Executors;+import java.util.concurrent.ScheduledExecutorService;+import java.util.concurrent.TimeUnit;++import com.google.common.base.Preconditions;++import org.slf4j.Logger;+import org.slf4j.LoggerFactory;++import com.datastax.driver.core.Cluster;+import com.datastax.driver.core.Host;+import com.datastax.driver.core.Session;+import com.datastax.driver.core.exceptions.NoHostAvailableException;+++/**+ * Since it's possible for the version of Cassandra to change under us, we need this delegate to wrap the functionality+ * of the underlying Cassandra adapter. If a server reboots, we can swap out the right Adapter when the driver+ * reconnects.+ *+ * This delegate *MUST* checkSession() before every call, because:+ *+ * 1. The session lazily connects+ * 2. We might need to swap out the adapter if the version has changed+ *+ */+public class CassandraAdapterDelegate implements ICassandraAdapter, Host.StateListener+{+ private final CQLSession cqlSession;+ private final CassandraVersionProvider versionProvider;+ private Session session;+ private CassandraVersion currentVersion;+ private ICassandraAdapter adapter;+ private Boolean isUp = false;+ private final int refreshRate;++ private static final Logger logger = LoggerFactory.getLogger(CassandraAdapterDelegate.class);+ private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();+ private boolean registered = false;++ public CassandraAdapterDelegate(CassandraVersionProvider provider, CQLSession cqlSession)+ {+ this(provider, cqlSession, 5000);+ }++ public CassandraAdapterDelegate(CassandraVersionProvider provider, CQLSession cqlSession, int refreshRate)+ {+ this.cqlSession = cqlSession;+ this.versionProvider = provider;+ this.refreshRate = refreshRate;+ }++ public synchronized void start()+ {+ logger.info("Starting health check");+ // TODO: maybe unhardcode
Ah yes, I originally had the time hard coded, removed it, then forgot to remove the comment.
comment created time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha 1888dbc2d0d8aa52eaab7523cb320ac0223d8d91
removed redundant registry call
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha 6897bd51e42fbf08d497a3618c0d447e16a942b9
removed unneeded code
push time in 3 months
push eventrustyrazorblade/cassandra-sidecar
commit sha af47885681907eff60be6ea693456cc85a214157
testing no docker
push time in 3 months