Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/integration' into 2365-consisten…
Browse files Browse the repository at this point in the history
…t-translateId-name
  • Loading branch information
Christopher Gross cogross committed Aug 12, 2024
2 parents dff4d9d + 30a9a07 commit 6a76342
Show file tree
Hide file tree
Showing 218 changed files with 196,780 additions and 1,785 deletions.
9 changes: 5 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

# In order to ensure the query microservices are consistent with the wildfly webservice, we need
# to ensure that changes made to QueryExecutorBean match QueryManagementService, and changes made
# to LookupUUIDUtil match LookupService in the Query Service.
QueryExecutorBean.java @jwomeara
LookupUUIDUtil.java @jwomeara
RunningQuery.java @jwomeara
QueryExecutorBean.java @jwomeara @ivakegg
LookupUUIDUtil.java @jwomeara @ivakegg
RunningQuery.java @jwomeara @ivakegg
/core/ @jwomeara @ivakegg
/warehouse/query-core/ @jwomeara @ivakegg
74 changes: 74 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
java-version: ${{env.JAVA_VERSION}}
maven-version: 3.9.5
cache: 'maven'
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Format code
env:
USER_NAME: ${{ secrets.USER_NAME }}
Expand All @@ -42,6 +46,7 @@ jobs:
- name: Commit Changes
run: |
if [ "$diffs_found" = true ]; then
git checkout -b ${{ steps.extract_branch.outputs.branch }}
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git commit -am "Formatting job fix"
Expand Down Expand Up @@ -150,6 +155,75 @@ jobs:
TAG=$(mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -q -N -Dmaven.build.cache.enabled=false -Dexec.executable='echo' -Dexec.args='${project.version}' exec:exec)
contrib/datawave-quickstart/docker/docker-build.sh ${TAG} --docker-opts "${DOCKER_BUILD_OPTS}"
compose-build-and-test-latest-snapshots:
runs-on: ubuntu-latest
steps:
- name: Free up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf $AGENT_TOOLSDIRECTORY
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up JDK ${{env.JAVA_VERSION}}
uses: actions/setup-java@v3
with:
distribution: ${{env.JAVA_DISTRIBUTION}}
java-version: ${{env.JAVA_VERSION}}
maven-version: 3.9.5
cache: 'maven'
# Builds the quickstart and microservice docker images and runs a query test
- name: Docker Compose Query Tests
env:
USER_NAME: ${{ secrets.USER_NAME }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
# update datawave dependencies to use the latest snapshots
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e versions:update-properties versions:update-parent -DallowSnapshots=true -Dincludes=gov.nsa.*
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Pcompose -Dmicroservice-docker -Dquickstart-docker -Ddeploy -Dtar -DskipTests clean install
# free up some space so that we don't run out
docker system prune -f
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -B -V -e -Pcompose -Dmicroservice-docker -Dquickstart-docker -Ddeploy -Dtar -DskipTests clean
cd docker
./bootstrap.sh
attempt=0
max_attempts=20
while [ $attempt -lt $max_attempts ]; do
attempt=$((attempt+1))
echo "Starting docker compose (Attempt ${attempt}/${max_attempts})"
nohup docker compose up -d --no-recreate < /dev/null > compose.out 2>&1 &
sleep 60s
cat compose.out
# check to see if the query service is running
QUERY="$(docker compose ps --status running --services | grep query || true)"
if [ "$QUERY" == "query" ] ; then
echo "Docker compose started successfully"
break
elif [ $attempt -eq $max_attempts ] ; then
echo "Failed to start docker compose"
exit 1
fi
done
cd scripts
./testAll.sh
- name: Dump Logs
if: failure()
run: |
cd docker
docker compose logs
# Here's an example of how you'd deploy the image to the github package registry.
# We don't want to do this by default since packages on github cannot be deleted
# or overwritten. So this could only be done for tags, however it seems the quickstart
Expand Down
2 changes: 1 addition & 1 deletion common-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>datawave-common-test</artifactId>
<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion contrib/datawave-quickstart/docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>quickstart</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/cached-results/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>datawave-core-cached-results</artifactId>
<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion core/common-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>datawave-core-common-util</artifactId>
<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion core/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>datawave-core-common</artifactId>
<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion core/connection-pool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>datawave-core-connection-pool</artifactId>
<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion core/map-reduce/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>datawave-core-map-reduce</artifactId>
<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion core/modification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>datawave-core-modification</artifactId>
<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave</groupId>
<artifactId>datawave-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>datawave-core-query</artifactId>
<name>${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public class GenericQueryConfiguration implements Serializable {
// use a value like 'env:PASS' to pull from the environment
private String accumuloPassword = "";

private String connPoolName;

// Whether or not this query emits every result or performs some kind of result reduction
protected boolean reduceResults = false;

Expand Down Expand Up @@ -100,6 +102,7 @@ public GenericQueryConfiguration(GenericQueryConfiguration genericConfig) {
this.setBaseIteratorPriority(genericConfig.getBaseIteratorPriority());
this.setBypassAccumulo(genericConfig.getBypassAccumulo());
this.setAccumuloPassword(genericConfig.getAccumuloPassword());
this.setConnPoolName(genericConfig.getConnPoolName());
this.setAuthorizations(genericConfig.getAuthorizations());
this.setBeginDate(genericConfig.getBeginDate());
this.setClient(genericConfig.getClient());
Expand Down Expand Up @@ -278,6 +281,14 @@ public void setAccumuloPassword(String password) {
this.accumuloPassword = EnvProvider.resolve(password);
}

public String getConnPoolName() {
return connPoolName;
}

public void setConnPoolName(String connPoolName) {
this.connPoolName = connPoolName;
}

public Map<String,ScannerBase.ConsistencyLevel> getTableConsistencyLevels() {
return tableConsistencyLevels;
}
Expand Down Expand Up @@ -336,12 +347,13 @@ && getBypassAccumulo() == that.getBypassAccumulo() && Objects.equals(getAuthoriz
&& Objects.equals(getBeginDate(), that.getBeginDate()) && Objects.equals(getEndDate(), that.getEndDate())
&& Objects.equals(getMaxWork(), that.getMaxWork()) && Objects.equals(getTableName(), that.getTableName())
&& Objects.equals(getQueries(), that.getQueries()) && Objects.equals(getAccumuloPassword(), that.getAccumuloPassword())
&& Objects.equals(isReduceResults(), that.isReduceResults());
&& Objects.equals(getConnPoolName(), that.getConnPoolName()) && Objects.equals(isReduceResults(), that.isReduceResults());
}

@Override
public int hashCode() {
return Objects.hash(isCheckpointable(), getAuthorizations(), getQuery(), getQueryString(), getBeginDate(), getEndDate(), getMaxWork(),
getBaseIteratorPriority(), getTableName(), getQueries(), getBypassAccumulo(), getAccumuloPassword(), isReduceResults());
getBaseIteratorPriority(), getTableName(), getQueries(), getBypassAccumulo(), getConnPoolName(), getAccumuloPassword(),
isReduceResults());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public abstract class BaseQueryLogic<T> implements QueryLogic<T> {
private int maxPageSize = 0;
private long pageByteTrigger = 0;
private boolean collectQueryMetrics = true;
private String _connPoolName;
private Set<String> authorizedDNs;

protected ProxiedUserDetails currentUser;
Expand Down Expand Up @@ -79,7 +78,6 @@ public BaseQueryLogic(BaseQueryLogic<T> other) {
setPageByteTrigger(other.getPageByteTrigger());
setCollectQueryMetrics(other.getCollectQueryMetrics());
this.authorizedDNs = other.authorizedDNs;
setConnPoolName(other.getConnPoolName());
setRequiredRoles(other.getRequiredRoles());
setSelectorExtractor(other.getSelectorExtractor());
setCurrentUser(other.getCurrentUser());
Expand Down Expand Up @@ -330,13 +328,13 @@ public void setCollectQueryMetrics(boolean collectQueryMetrics) {
/** {@inheritDoc} */
@Override
public String getConnPoolName() {
return _connPoolName;
return getConfig().getConnPoolName();
}

/** {@inheritDoc} */
@Override
public void setConnPoolName(final String connPoolName) {
_connPoolName = connPoolName;
getConfig().setConnPoolName(connPoolName);
}

/** {@inheritDoc} */
Expand Down
2 changes: 1 addition & 1 deletion core/utils/metadata-utils
2 changes: 1 addition & 1 deletion core/utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-core-parent</artifactId>
<version>7.2.0-SNAPSHOT</version>
<version>7.4.0-SNAPSHOT</version>
</parent>
<groupId>gov.nsa.datawave.core</groupId>
<artifactId>datawave-utils-parent</artifactId>
Expand Down
Empty file modified docker/config/application-federation.yml
100644 → 100755
Empty file.
17 changes: 6 additions & 11 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ services:

# When auto.create.topics.enable is true, this causes deleted topics to be recreated at random. So, leave it disabled.
kafka:
profiles:
- kafka
image: docker.io/bitnami/kafka:3.2
ports:
- "9094:9094"
Expand All @@ -102,8 +104,7 @@ services:

kafdrop:
profiles:
- management
- full
- kafka
image: docker.io/obsidiandynamics/kafdrop
ports:
- "8999:9000"
Expand Down Expand Up @@ -365,7 +366,7 @@ services:
- AUDIT_SERVER_URL=http://audit:8080/audit
- HADOOP_HOST=${DW_HADOOP_HOST}
- HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/etc/hadoop/conf}
- "BACKEND=${BACKEND:-kafka}"
- "BACKEND=${BACKEND:-rabbitmq}"
- CACHED_RESULTS=${CACHED_RESULTS:-false}
ports:
- "8080:8080"
Expand All @@ -390,8 +391,6 @@ services:
condition: service_healthy
metrics:
condition: service_healthy
kafka:
condition: service_started
executor-pool1:
condition: service_started

Expand Down Expand Up @@ -430,8 +429,6 @@ services:
condition: service_healthy
metrics:
condition: service_healthy
kafka:
condition: service_started
executor-pool1:
condition: service_started

Expand All @@ -448,7 +445,7 @@ services:
environment:
- ZOOKEEPER_HOST=${DW_ZOOKEEPER_HOST}
- HADOOP_HOST=${DW_HADOOP_HOST}
- BACKEND=${BACKEND:-kafka}
- BACKEND=${BACKEND:-rabbitmq}
- HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/etc/hadoop/conf}
# This mapping is required to enable the metrics service to communicate
# with host-deployed services like hadoop, zookeeper, and accumulo.
Expand Down Expand Up @@ -479,8 +476,6 @@ services:
condition: service_healthy
metrics:
condition: service_healthy
kafka:
condition: service_started

executor-pool2:
profiles:
Expand All @@ -497,7 +492,7 @@ services:
environment:
- ZOOKEEPER_HOST=${DW_ZOOKEEPER_HOST}
- HADOOP_HOST=${DW_HADOOP_HOST}
- BACKEND=${BACKEND:-kafka}
- BACKEND=${BACKEND:-rabbitmq}
- HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/etc/hadoop/conf}
# This mapping is required to enable the metrics service to communicate
# with host-deployed services like hadoop, zookeeper, and accumulo.
Expand Down
Loading

0 comments on commit 6a76342

Please sign in to comment.