R/zzz.R

Defines functions .onLoad

## hadoop root directory has to be set

hive <- local({
               .henv <- .hive_default_env()
               function(new){
                 if(missing(new))
                   .henv
                 else
                   .henv <<- new
               }}
              )

.onLoad <- function(libname, pkgname){
    ## initialize hive environment
    hive(.hinit())
    .jpackage(pkgname, lib.loc = libname)
    if( is.environment(hive()) )
    {
        if(!hive_start(hive()))
            warning("Hadoop home exists but no Hadoop cluster was started.")
    }
}

Try the hive package in your browser

Any scripts or data that you put into this service are public.

hive documentation built on Jan. 12, 2020, 6:19 p.m.