Code Monkey home page Code Monkey logo

dssrip2's People

Contributors

mkoohafkan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dssrip2's Issues

Java heap allocated memory too low

When performing a dss_catalog call on a large DSS file, the JVM may run out of heap space, producing the error:

java.lang.OutOfMemoryError: Java heap space

The solution is to set the JVM parameter prior to the library call to dssrip2, increasing the allocated JVM memory. e.g.:

options(java.parameters = "-Xmx8000m")
library(dssrip2)

If dssrip2 could increase allocated memory prior to launching the JVM, that would be ideal.

Connection to HEC-DSSVue jars

I am unable to connect to program files. I have attached my version of HEC-DSSVue and HEC-DSSVue jar availible. My path is correct so I am unsure of the issue.

# remotes::install_github("mkoohafkan/dssrip2",force = TRUE)
require(dssrip2)
options(dss.home = "C:/Program Files/HEC/HEC-DSSVue")
options(dss.monolith = FALSE)
dss_connect('C:/Program Files/HEC/HEC-DSSVue')

Error message:
Error in get_jars(dss_home, monolith) :
No matches found for HEC-DSSVue jars:
hec.jar
rma.jar
lookup.jar
hec-dssvue.+.jar
help/dssvueHelp.jar

Version of HEC-DSSVue:
2023-05-17 13_45_31-Mail

HEC-DSSVue jar availible:
2023-05-17 13_46_29-jar
2023-05-17 13_48_22-jar
2023-05-17 13_49_10-jar

Should DSSVue installs be supported?

Monolith is an independent collection of jars and DLL that does not require system install and will not conflict with existing DSSVue installations. Is there actually any value to supporting DSSVue installations?

Pros to supporting DSSVue

  • Convenient for users who already have DSSVue installed
  • Clear versioning

Cons

  • Requires version-dependent configurations, since jars may be reorganized between versions. No obvious way to automatically determine DSSVue version.
  • Possible Java complications since DSSVue is bundled with its own Java binaries, but R uses Java system install.

Related: #9

DSS attributes

There are several attributes of a DSS record that don't translate directly to R data frames or rasters. Right now dss_read() adds one or more attributes to the data frame with naming convention dss.<attribute name> while dss_write() requires a user-supplied list with additional attributes. This is inconsistent. A more streamlined approach might be:

  1. dss_read() adds an attribute dss_attributes which is a named list of DSS parameters.
  2. new function dss_add_attributes() takes a user-supplied list of attributes and checks/formats it as an attribute dss_attributes.
  3. dss_write() checks for an attribute dss_attributes that contains all the required attributes.

The general interface requirement is that you can do

dss_write(dss_read(file, pathname), file2, pathname2)
expect_equal(dss_read(file, pathname), dss_read(file2, pathname2))

# new_data created in R
new_data = dss_add_attributes(new_data, list(...))
dss_write(new_data, new_file, new_pathname)

Error when trying to read dss file (java.lang.NullPointerException)

Hi, I'm trying to use dssrip2 on my office computer. When I try to use the dss_read command, I get the following error:

Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.NullPointerException

It seems to work fine on my personal computer, though. Any idea how to fix this?

cache dss catalog

getting the catalog for large DSS-6 files is obscenely slow. We can use the same approach as the file handle store to cache the catalog (both condensed and non-condensed). calling dss_catalog(rebuild = TRUE) will trigger recreating the cache.

check if Java object "databases" are still needed

Some leftover code from dssrip creates several environments and functions containing Java object descriptions:

hecJavaObjectFieldsDB
hecJavaObjectMethodsDB
hecJavaConstantsDB
hecJavaConnectionDB
get_field()
use_method()

These are probably no longer needed and can be removed.

Increasing Java Heap Space

May want to suggest users increase Java heap space options prior to initializing dssrip2, or do this as a default behavior. I have received the following error running dss_catalog function:

java.lang.OutOfMemoryError: GC overhead limit exceeded

Setting option to increase JVM heap space resolved issue:

options(java.parameters = "-Xmx8000m")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.