Skip to content

Commit

Permalink
Updated KeySnapshot/KeyInfo to include numerous and numcols for frame…
Browse files Browse the repository at this point in the history
…s (since we can't have byte size).
  • Loading branch information
tomasnykodym committed Aug 12, 2014
1 parent b3edb5a commit 85c8afe
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/main/java/water/H2O.java
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,9 @@ public static final class KeyInfo extends Iced implements Comparable<KeyInfo>{
public final Key _key;
public final int _type;
public final boolean _rawData;
public final long _sz;
public final int _sz;
public final int _ncols;
public final long _nrows;
public final byte _backEnd;

public KeyInfo(Key k, Value v){
Expand All @@ -1362,12 +1364,19 @@ public KeyInfo(Key k, Value v){
_type = v.type();
_rawData = v.isRawData();
if(v.isFrame()){
Frame f = v.get();
// NOTE: can't get byteSize here as it may invoke RollupStats! :(
// Frame f = v.get();

// _sz = f.byteSize();
_sz = v._max;
} else
// do at least nrows/ncols instead
_ncols = f.numCols();
_nrows = f.numRows();
} else {
_sz = v._max;
_ncols = 0;
_nrows = 0;
}
_backEnd = v.backend();
}
@Override public int compareTo(KeyInfo ki){ return _key.compareTo(ki._key);}
Expand Down

0 comments on commit 85c8afe

Please sign in to comment.