Search in sources :

Example 6 with Iced

use of water.Iced in project h2o-3 by h2oai.

the class ZipUtil method isZipDirectory.

/**
   * This method check if the input argument is a zip directory containing files.
   *
   * @param key
   * @return true if bv is a zip directory containing files, false otherwise.
   */
static boolean isZipDirectory(Key key) {
    Iced ice = DKV.getGet(key);
    if (ice == null)
        throw new H2OIllegalArgumentException("Missing data", "Did not find any data under " + "key " + key);
    ByteVec bv = (ByteVec) (ice instanceof ByteVec ? ice : ((Frame) ice).vecs()[0]);
    return isZipDirectory(bv);
}
Also used : Frame(water.fvec.Frame) H2OIllegalArgumentException(water.exceptions.H2OIllegalArgumentException) Iced(water.Iced) ByteVec(water.fvec.ByteVec)

Aggregations

Iced (water.Iced)6 Frame (water.fvec.Frame)3 MalformedURLException (java.net.MalformedURLException)2 Key (water.Key)2 SchemaMetadataV3 (water.api.schemas3.SchemaMetadataV3)2 H2OIllegalArgumentException (water.exceptions.H2OIllegalArgumentException)2 ByteVec (water.fvec.ByteVec)2 Model (hex.Model)1 Freezable (water.Freezable)1 ValNum (water.rapids.vals.ValNum)1