Skip to content

Commit 2abb3e4

Browse files
committed
Cacheable Data revert formatting
1 parent e4526d2 commit 2abb3e4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/main/java/org/apache/sysds/runtime/controlprogram/caching/CacheableData.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ public synchronized void exportData (String fName, String outputFormat, int repl
847847
if ( !isAvailableToRead() )
848848
throw new DMLRuntimeException("MatrixObject not available to read.");
849849

850-
if(LOG.isTraceEnabled())
850+
if( LOG.isTraceEnabled() )
851851
LOG.trace("Exporting " + this.getDebugName() + " to " + fName + " in format " + outputFormat);
852852

853853
if( DMLScript.USE_ACCELERATOR && _gpuObjects != null ) {
@@ -877,17 +877,17 @@ public synchronized void exportData (String fName, String outputFormat, int repl
877877
boolean eqFormat = isEqualOutputFormat(outputFormat);
878878
boolean eqBlksize = (getBlocksize() != blen)
879879
&& (outputFormat == null || outputFormat.equals("binary"));
880-
//actual export (note: no direct transfer of local copy in order to ensure blocking (and hence, parallelism))
881-
if( isDirty() || !eqScheme || isFederated() || (pWrite && (!eqFormat | !eqBlksize))) {
880+
//actual export (note: no direct transfer of local copy in order to ensure blocking (and hence, parallelism))
881+
if( isDirty() || !eqScheme || isFederated() ||
882+
(pWrite && (!eqFormat | !eqBlksize)) )
883+
{
882884

883885
// CASE 1: dirty in-mem matrix or pWrite w/ different format (write matrix to fname; load into memory if evicted)
884886
// a) get the matrix
885887
boolean federatedWrite = (outputFormat != null ) && outputFormat.contains("federated");
886888

887-
if(!federatedWrite){
888-
889-
890-
//get object from cache
889+
//get object from cache
890+
if(!federatedWrite) {
891891
if( _data == null )
892892
getCache();
893893

@@ -911,7 +911,6 @@ else if(!federatedWrite) // pull back from federated site.
911911
}
912912

913913
acquire( false, _data==null ); //incl. read matrix if evicted
914-
915914
}
916915

917916
// b) write the matrix

0 commit comments

Comments
 (0)