Skip to content

Commit

Permalink
Merge pull request #615 from samtools/dr_disable_intel_gkl
Browse files Browse the repository at this point in the history
Disable the IntelDeflater for now, since we can't publish to maven central with a dependency on an intel-gkl snapshot
  • Loading branch information
droazen committed May 27, 2016
2 parents 8bd8613 + 261f339 commit 52df499
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ repositories {

// Include the Broad artifactory for intel-gkl snapshots. This is temporary
// until intel-gkl is available on maven central.
maven {
url "https://artifactory.broadinstitute.org/artifactory/libs-snapshot/"
}
//maven {
// url "https://artifactory.broadinstitute.org/artifactory/libs-snapshot/"
//}
}

jacocoTestReport {
Expand All @@ -47,7 +47,9 @@ dependencies {
compile "org.apache.commons:commons-compress:1.4.1"
compile "org.tukaani:xz:1.5"
compile "gov.nih.nlm.ncbi:ngs-java:1.2.2"
compile "com.intel:intel-gkl:0.0.1-20160525.160915-2"

// Disabled until intel-gkl is in maven central
// compile "com.intel:intel-gkl:0.0.1-20160525.160915-2"

testCompile "org.testng:testng:6.9.9"
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/htsjdk/samtools/util/zip/DeflaterFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package htsjdk.samtools.util.zip;

import com.intel.gkl.compression.IntelDeflater;
// import com.intel.gkl.compression.IntelDeflater;
import htsjdk.samtools.Defaults;
import htsjdk.samtools.SAMException;

Expand Down Expand Up @@ -52,6 +52,8 @@ public class DeflaterFactory {
static {
boolean intelDeflaterLibrarySuccessfullyLoaded = false;

// Disabled until the intel-gkl library is available on maven central
/*
try {
if (Defaults.TRY_USE_INTEL_DEFLATER) {
@SuppressWarnings("unchecked")
Expand All @@ -71,7 +73,7 @@ public class DeflaterFactory {
IllegalAccessException | InstantiationException | InvocationTargetException e ) {
intelDeflaterConstructor = null;
}

*/
usingIntelDeflater = intelDeflaterConstructor != null && intelDeflaterLibrarySuccessfullyLoaded;
}

Expand Down
3 changes: 2 additions & 1 deletion src/test/java/htsjdk/samtools/util/IntelDeflaterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Iterator<Object[]> TestIntelDeflaterIsLoadedData(){
return retVal.iterator();
}

@Test(dataProvider = "TestIntelDeflaterIsLoadedData", groups={"intel"}, expectedExceptions = IllegalAccessError.class)
// TODO: re-enable once the IntelDeflater is re-activated
@Test(dataProvider = "TestIntelDeflaterIsLoadedData", groups={"intel"}, expectedExceptions = IllegalAccessError.class, enabled = false)
public void TestIntelDeflatorIsLoaded(final File inputFile, final Boolean eagerlyDecode,final Integer compressionLevel) throws IOException,IllegalAccessError {
Log log = Log.getInstance(IntelDeflaterTest.class);
Log.setGlobalLogLevel(Log.LogLevel.INFO);
Expand Down

0 comments on commit 52df499

Please sign in to comment.