Skip to content

Commit

Permalink
Rename code/comment/metrics/config occurrences to Astra (#840)
Browse files Browse the repository at this point in the history
Co-authored-by: Bryan Burkholder <[email protected]>
  • Loading branch information
bryanlb and bryanlb authored Apr 4, 2024
1 parent 9166653 commit 12e656c
Show file tree
Hide file tree
Showing 363 changed files with 3,925 additions and 3,927 deletions.
2 changes: 0 additions & 2 deletions .git-blame-ignore-revs

This file was deleted.

8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ well.
There are many ways you can contribute! :heart:

### Bug Reports and Fixes :bug:
- If you find a bug, please search for it in the [Issues](https://github.com/slackhq/kaldb/issues), and if it isn't already tracked,
[create a new issue](https://github.com/slackhq/kaldb/issues/new). Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still
- If you find a bug, please search for it in the [Issues](https://github.com/slackhq/astra/issues), and if it isn't already tracked,
[create a new issue](https://github.com/slackhq/astra/issues/new). Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still
be reviewed.
- Issues that have already been identified as a bug (note: able to reproduce) will be labelled `bug`.
- If you'd like to submit a fix for a bug, [send a Pull Request](#creating_a_pull_request) and mention the Issue number.
- Include tests that isolate the bug and verifies that it was fixed.

### New Features :bulb:
- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue](https://github.com/slackhq/kaldb/issues/new).
- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue](https://github.com/slackhq/astra/issues/new).
- Issues that have been identified as a feature request will be labelled `enhancement`.
- If you'd like to implement the new feature, please wait for feedback from the project
maintainers before spending too much time writing the code. In some cases, `enhancement`s may
Expand All @@ -28,7 +28,7 @@ There are many ways you can contribute! :heart:
alternative implementation of something that may have advantages over the way its currently
done, or you have any other change, we would be happy to hear about it!
- If its a trivial change, go ahead and [send a Pull Request](#creating_a_pull_request) with the changes you have in mind.
- If not, [open an Issue](https://github.com/slackhq/kaldb/issues/new) to discuss the idea first.
- If not, [open an Issue](https://github.com/slackhq/astra/issues/new) to discuss the idea first.

If you're new to our project and looking for some way to make your first contribution, look for
Issues labelled `good first contribution`.
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Describe your issue here.
- [ ] discussion

### Requirements (place an `x` in each of the `[ ]`)
* [ ] I've read and understood the [Contributing guidelines](https://github.com/slackhq/kaldb/blob/master/.github/CONTRIBUTING.md) and have done my best effort to follow them.
* [ ] I've read and understood the [Contributing guidelines](https://github.com/slackhq/astra/blob/master/.github/CONTRIBUTING.md) and have done my best effort to follow them.
* [ ] I've read and agree to the [Code of Conduct](https://slackhq.github.io/code-of-conduct).
* [ ] I've searched for any related issues and avoided creating a duplicate issue.

Expand All @@ -23,7 +23,7 @@ Filling out the following details about bugs will help us solve your issue soone

#### Reproducible in:

Kaldb version:
Astra version:

Java version:

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If applicable, add screenshots to help explain your problem.

#### Reproducible in:

KalDB version:
Astra version:

JVM version:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
const thisRunMetric = thisRun?.data.primaryMetric;
const mostRecentOtherRunMetric = mostRecentOtherRun?.data.primaryMetric;
const delta = (thisRunMetric?.score - mostRecentOtherRunMetric?.score) / mostRecentOtherRunMetric?.score * 100;
rows = rows + `|${key.replace("com.slack.kaldb.","")}|${mostRecentOtherRunMetric?.score.toFixed(1)} <sup>±${mostRecentOtherRunMetric?.scoreError.toFixed(1)}</sup>|${thisRunMetric?.score.toFixed(1)} <sup>±${thisRunMetric?.scoreError.toFixed(1)}</sup>|${delta?.toFixed(1)}%|\n`
rows = rows + `|${key.replace("com.slack.astra.","")}|${mostRecentOtherRunMetric?.score.toFixed(1)} <sup>±${mostRecentOtherRunMetric?.scoreError.toFixed(1)}</sup>|${thisRunMetric?.score.toFixed(1)} <sup>±${thisRunMetric?.scoreError.toFixed(1)}</sup>|${delta?.toFixed(1)}%|\n`
});

const op = `${header}\n${subheader}\n${rows}`;
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
distribution: 'corretto'
cache: 'maven'
- name: Ensure code is formatted
run: mvn -B -Dstyle.color=always com.spotify.fmt:fmt-maven-plugin:check --file kaldb/pom.xml
run: mvn -B -Dstyle.color=always com.spotify.fmt:fmt-maven-plugin:check --file astra/pom.xml
- name: Ensure jmh benchmark code is formatted
run: mvn -B -Dstyle.color=always com.spotify.fmt:fmt-maven-plugin:check --file benchmarks/pom.xml
- name: Build with Maven
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ benchmarks/jmh-output/

# Test files
indices/
**kaldb-slot-log**
**astra-slot-log**

# go vendor files.
vendor/
8 changes: 4 additions & 4 deletions .run/KalDb_cache.run.xml → .run/Astra_cache.run.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KalDb Cache Node" type="Application" factoryName="Application">
<configuration default="false" name="Astra Cache Node" type="Application" factoryName="Application">
<envs>
<env name="NODE_ROLES" value="CACHE" />
</envs>
<option name="MAIN_CLASS_NAME" value="com.slack.kaldb.server.Kaldb" />
<module name="kaldb" />
<option name="MAIN_CLASS_NAME" value="com.slack.astra.server.Astra" />
<module name="astra" />
<option name="PROGRAM_PARAMETERS" value="config/config.yaml" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
8 changes: 4 additions & 4 deletions .run/KalDb_index.run.xml → .run/Astra_index.run.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KalDb Index Node" type="Application" factoryName="Application">
<configuration default="false" name="Astra Index Node" type="Application" factoryName="Application">
<envs>
<env name="NODE_ROLES" value="INDEX" />
</envs>
<option name="MAIN_CLASS_NAME" value="com.slack.kaldb.server.Kaldb" />
<module name="kaldb" />
<option name="MAIN_CLASS_NAME" value="com.slack.astra.server.Astra" />
<module name="astra" />
<option name="PROGRAM_PARAMETERS" value="config/config.yaml" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
8 changes: 4 additions & 4 deletions .run/KalDb_manager.run.xml → .run/Astra_manager.run.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KalDb Manager Node" type="Application" factoryName="Application">
<configuration default="false" name="Astra Manager Node" type="Application" factoryName="Application">
<envs>
<env name="NODE_ROLES" value="MANAGER" />
</envs>
<option name="MAIN_CLASS_NAME" value="com.slack.kaldb.server.Kaldb" />
<module name="kaldb" />
<option name="MAIN_CLASS_NAME" value="com.slack.astra.server.Astra" />
<module name="astra" />
<option name="PROGRAM_PARAMETERS" value="config/config.yaml" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KalDb Preprocessor Node" type="Application" factoryName="Application">
<configuration default="false" name="Astra Preprocessor Node" type="Application" factoryName="Application">
<envs>
<env name="NODE_ROLES" value="PREPROCESSOR" />
</envs>
<option name="MAIN_CLASS_NAME" value="com.slack.kaldb.server.Kaldb" />
<module name="kaldb" />
<option name="MAIN_CLASS_NAME" value="com.slack.astra.server.Astra" />
<module name="astra" />
<option name="PROGRAM_PARAMETERS" value="config/config.yaml" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
8 changes: 4 additions & 4 deletions .run/KalDb_query.run.xml → .run/Astra_query.run.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KalDb Query Node" type="Application" factoryName="Application">
<configuration default="false" name="Astra Query Node" type="Application" factoryName="Application">
<envs>
<env name="NODE_ROLES" value="QUERY" />
</envs>
<option name="MAIN_CLASS_NAME" value="com.slack.kaldb.server.Kaldb" />
<module name="kaldb" />
<option name="MAIN_CLASS_NAME" value="com.slack.astra.server.Astra" />
<module name="astra" />
<option name="PROGRAM_PARAMETERS" value="config/config.yaml" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
8 changes: 4 additions & 4 deletions .run/KalDb_recovery.run.xml → .run/Astra_recovery.run.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KalDb Recovery Node" type="Application" factoryName="Application">
<configuration default="false" name="Astra Recovery Node" type="Application" factoryName="Application">
<envs>
<env name="NODE_ROLES" value="RECOVERY" />
</envs>
<option name="MAIN_CLASS_NAME" value="com.slack.kaldb.server.Kaldb" />
<module name="kaldb" />
<option name="MAIN_CLASS_NAME" value="com.slack.astra.server.Astra" />
<module name="astra" />
<option name="PROGRAM_PARAMETERS" value="config/config.yaml" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ COPY . /work/
RUN cd /work; mvn package -DskipTests

FROM amazoncorretto:21
COPY --from=build /work/kaldb/target/kaldb.jar /
COPY --from=build /work/astra/target/astra.jar /
COPY --from=build /work/config/config.yaml /
ENTRYPOINT [ "java", "--enable-preview", "-jar", "./kaldb.jar", "config.yaml" ]
ENTRYPOINT [ "java", "--enable-preview", "-jar", "./astra.jar", "config.yaml" ]
8 changes: 4 additions & 4 deletions kaldb/pom.xml → astra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.slack.kaldb</groupId>
<artifactId>kaldb</artifactId>
<groupId>com.slack.astra</groupId>
<artifactId>astra</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>

Expand All @@ -15,7 +15,7 @@
-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javac.target>21</javac.target>
<uberjar.name>kaldb</uberjar.name>
<uberjar.name>astra</uberjar.name>
<http.core.version>4.4.16</http.core.version>
<protobuf.version>3.25.3</protobuf.version>
<grpc.version>1.62.2</grpc.version>
Expand Down Expand Up @@ -620,7 +620,7 @@
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.slack.kaldb.server.Kaldb</Main-Class>
<Main-Class>com.slack.astra.server.Astra</Main-Class>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</transformer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.slack.kaldb.blobfs;
package com.slack.astra.blobfs;

import java.io.Closeable;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.slack.kaldb.blobfs;
package com.slack.astra.blobfs;

public interface BlobFsConfig {
String getProperty(String propertyName);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.slack.kaldb.blobfs;
package com.slack.astra.blobfs;

import java.io.BufferedInputStream;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.slack.kaldb.blobfs.s3;
package com.slack.astra.blobfs.s3;

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.slack.kaldb.blobfs.BlobFs;
import com.slack.kaldb.blobfs.BlobFsConfig;
import com.slack.kaldb.proto.config.KaldbConfigs;
import com.slack.astra.blobfs.BlobFs;
import com.slack.astra.blobfs.BlobFsConfig;
import com.slack.astra.proto.config.AstraConfigs;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -66,7 +66,7 @@ static boolean isNullOrEmpty(String target) {
return target == null || "".equals(target);
}

public static S3Client initS3Client(KaldbConfigs.S3Config config) {
public static S3Client initS3Client(AstraConfigs.S3Config config) {
Preconditions.checkArgument(!isNullOrEmpty(config.getS3Region()));
String region = config.getS3Region();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.slack.kaldb.blobfs.s3;
package com.slack.astra.blobfs.s3;

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.slack.kaldb.blobfs.BlobFs;
import com.slack.kaldb.blobfs.BlobFsConfig;
import com.slack.kaldb.proto.config.KaldbConfigs;
import com.slack.astra.blobfs.BlobFs;
import com.slack.astra.blobfs.BlobFsConfig;
import com.slack.astra.proto.config.AstraConfigs;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -86,7 +86,7 @@ static boolean isNullOrEmpty(String target) {
return target == null || "".equals(target);
}

public static S3AsyncClient initS3Client(KaldbConfigs.S3Config config) {
public static S3AsyncClient initS3Client(AstraConfigs.S3Config config) {
Preconditions.checkArgument(!isNullOrEmpty(config.getS3Region()));
String region = config.getS3Region();

Expand All @@ -108,7 +108,7 @@ public static S3AsyncClient initS3Client(KaldbConfigs.S3Config config) {
long maxNativeMemoryLimitBytes =
Long.parseLong(
System.getProperty(
"kaldb.s3CrtBlobFs.maxNativeMemoryLimitBytes",
"astra.s3CrtBlobFs.maxNativeMemoryLimitBytes",
String.valueOf(defaultCrtMemoryLimit)));
LOG.info(
"Using a maxNativeMemoryLimitInBytes for the S3AsyncClient of '{}' bytes",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.slack.kaldb.bulkIngestApi;
package com.slack.astra.bulkIngestApi;

import static com.linecorp.armeria.common.HttpStatus.INTERNAL_SERVER_ERROR;

import com.linecorp.armeria.common.HttpResponse;
import com.linecorp.armeria.common.HttpStatus;
import com.linecorp.armeria.server.annotation.Post;
import com.slack.kaldb.bulkIngestApi.opensearch.BulkApiRequestParser;
import com.slack.kaldb.proto.schema.Schema;
import com.slack.astra.bulkIngestApi.opensearch.BulkApiRequestParser;
import com.slack.astra.proto.schema.Schema;
import com.slack.service.murron.trace.Trace;
import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.MeterRegistry;
Expand All @@ -31,9 +31,9 @@ public class BulkIngestApi {
private final Counter incomingByteTotal;
private final Counter incomingDocsTotal;
private final Timer bulkIngestTimer;
private final String BULK_INGEST_INCOMING_BYTE_TOTAL = "kaldb_preprocessor_incoming_byte";
private final String BULK_INGEST_INCOMING_BYTE_DOCS = "kaldb_preprocessor_incoming_docs";
private final String BULK_INGEST_TIMER = "kaldb_preprocessor_bulk_ingest";
private final String BULK_INGEST_INCOMING_BYTE_TOTAL = "astra_preprocessor_incoming_byte";
private final String BULK_INGEST_INCOMING_BYTE_DOCS = "astra_preprocessor_incoming_docs";
private final String BULK_INGEST_TIMER = "astra_preprocessor_bulk_ingest";
private final int rateLimitExceededErrorCode;
private final Schema.IngestSchema schema;

Expand All @@ -60,7 +60,7 @@ public BulkIngestApi(

@Post("/_bulk")
public HttpResponse addDocument(String bulkRequest) {
// 1. Kaldb does not support the concept of "updates". It's always an add.
// 1. Astra does not support the concept of "updates". It's always an add.
// 2. The "index" is used as the span name
CompletableFuture<HttpResponse> future = new CompletableFuture<>();
Timer.Sample sample = Timer.start(meterRegistry);
Expand Down
Loading

0 comments on commit 12e656c

Please sign in to comment.