Skip to content

Commit

Permalink
storage: Fix newPhoenixRecordReader creation at hbase-compat2.0 #TASK…
Browse files Browse the repository at this point in the history
…-5663
  • Loading branch information
j-coll committed Feb 22, 2024
1 parent e8a2b4a commit 565693f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,6 @@ jobs:
report_paths: './**/surefire-reports/TEST-*.xml'
commit: '${{ github.sha }}'
fail_on_test_failures: true
fail_if_no_tests: false


Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,9 @@ public static void setUpCatalogManager(CatalogManager catalogManager) throws Cat
studyId = catalogManager.getStudyManager().create(projectId, "phase1", null, "Phase 1", "Done", null, null, null, null, null,
sessionIdUser).first().getId();

try {
family = createDummyFamily("Martinez-Martinez").first();
} catch (CatalogException e) {
}
try {
family2 = createDummyFamily("Lopez-Lopez", Arrays.asList("father11-sample", "mother11-sample"), 1).first();
} catch (CatalogException e) {
}
try {
family3 = createDummyFamily("Perez-Perez", Arrays.asList("father22-sample", "mother22-sample", "child222-sample"), 0).first();
} catch (CatalogException e) {
}
family = createDummyFamily("Martinez-Martinez").first();
family2 = createDummyFamily("Lopez-Lopez", Arrays.asList("father11-sample", "mother11-sample"), 1).first();
family3 = createDummyFamily("Perez-Perez", Arrays.asList("father22-sample", "mother22-sample", "child222-sample"), 0).first();
}

@After
Expand Down
6 changes: 5 additions & 1 deletion opencga-app/app/misc/solr/prepare_configsets.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

set -e
set -o pipefail
set -o nounset

if [ $# -eq 2 ]; then
echo $0 $@
else
Expand All @@ -19,7 +23,7 @@ sed -i "s/REPLACEME_OPENCGA_VERSION/${VERSION}/g" "${SOLR_DIR}/INSTALL.md"
sed -i "s/REPLACEME_OPENCGA_VERSION/${VERSION}/g" "${SOLR_DIR}/install.sh"

# Iterate over the different config sets
for name in variant rga rga-aux file sample individual family cohort job; do
for name in variant rga rga-aux; do
CONFIG_SET_NAME="opencga-$name-configset-$VERSION"
CONFIG_SET_DIR="$SOLR_DIR/$CONFIG_SET_NAME"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.mapreduce.lib.db.DBWritable;
import org.apache.phoenix.compile.QueryPlan;
import org.apache.phoenix.iterate.MapReduceParallelScanGrouper;
import org.apache.phoenix.mapreduce.PhoenixRecordReader;
import org.apache.phoenix.schema.PColumn;
import org.apache.phoenix.schema.PTable;
import org.apache.phoenix.schema.PTableImpl;

import java.lang.reflect.Constructor;
import java.sql.SQLException;
import java.util.List;

Expand All @@ -23,14 +21,7 @@ public PTable makePTable(List<PColumn> columns) throws SQLException {
@Override
public <T extends DBWritable> PhoenixRecordReader<T> newPhoenixRecordReader(Class<T> inputClass, Configuration configuration,
QueryPlan queryPlan) {
try {
Constructor<PhoenixRecordReader> constructor = PhoenixRecordReader.class
.getConstructor(Class.class, Configuration.class, QueryPlan.class, MapReduceParallelScanGrouper.class);
constructor.setAccessible(true);
return constructor.newInstance(inputClass, configuration, queryPlan, MapReduceParallelScanGrouper.getInstance());
} catch (ReflectiveOperationException e) {
throw new IllegalStateException(e);
}
return new PhoenixRecordReader<>(inputClass, configuration, queryPlan);
}

@Override
Expand Down

0 comments on commit 565693f

Please sign in to comment.