GithubHelp home page GithubHelp logo

rec-framework / rec-core Goto Github PK

View Code? Open in Web Editor NEW
19.0 5.0 4.0 508 KB

Data pipelining service

Home Page: http://rec.kimleo.net

License: MIT License

Java 94.46% Shell 0.43% JavaScript 5.11%
modeling data-processing records stream

rec-core's People

Contributors

gitter-badger avatar jimmylv avatar kenpusney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rec-core's Issues

Add encoding convertor?

Issue found in #35 , when specified CSV file in utf-8 mode, it will cause potential encoding problem.

Suggest add a conversion method to convert file from one encoding to another.

Replace Kotlin script engine with JavaScript

Currently using kotlin has a lot of weird behavior, try switch JS instead.

As this is built on top of Java 8, an option is nashorn.

but not sure nashorn support for modern ES standard, still will using Rhino.

[EPIC] Rec-cloud requested features

Features:

  • CSV loader accepts Reader/InputStream instead of File.
  • Scripting.runScript accepts Reader/InputStream instead of file name.
  • ExecutionContext / 'rec' module should only shared by every scripting instance instead of static/global.
  • Add Resource interface which provides Source directly.

FlatFileTarget IndexOutOfBoundException

code:

const cnt = counter(function() true);
const file = flat('timestamps.csv');

csv('combined.csv', "...")
   .tee(cnt)
   .to(file);

file

blabal, ... ,,,
Caused by: java.lang.IndexOutOfBoundsException: Index: 13, Size: 13
        at java.util.ArrayList.rangeCheck(Unknown Source)
        at java.util.ArrayList.get(Unknown Source)
        at net.kimleo.rec.sepval.SepValEntry.get(SepValEntry.java:19)
        at net.kimleo.rec.sepval.SepValEntry.get(SepValEntry.java:7)
        at net.kimleo.rec.v2.accessor.RecordWrapper.getByIndex(RecordWrapper.java:41)
        at net.kimleo.rec.v2.accessor.RecordWrapper.get(RecordWrapper.java:34)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.collect(Unknown Source)
        at net.kimleo.rec.v2.model.impl.FlatFileTarget.put(FlatFileTarget.java:30)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.Iterator.forEachRemaining(Unknown Source)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.forEach(Unknown Source)
        at net.kimleo.rec.v2.model.impl.FlatFileTarget.putAll(FlatFileTarget.java:35)
        at net.kimleo.rec.v2.model.Source.to(Source.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
        ... 15 more

Rec cannot use RxJS because cannot initialize global context

Rec get following error while loading and running rx.js:

=> Rec v2
Exception in thread "main" org.mozilla.javascript.JavaScriptException: Error: RxJS could not find any global context (window, self, global) (rx#34)
        at org.mozilla.javascript.gen.rx_3._c_anonymous_2(rx:34)
        at org.mozilla.javascript.gen.rx_3.call(rx)
        at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
        at org.mozilla.javascript.gen.rx_3._c_anonymous_1(rx:20)
        at org.mozilla.javascript.gen.rx_3.call(rx)
        at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
        at org.mozilla.javascript.gen.rx_3._c_script_0(rx:20)
        at org.mozilla.javascript.gen.rx_3.call(rx)
        at org.mozilla.javascript.gen.rx_3.exec(rx)
        at org.mozilla.javascript.commonjs.module.Require.executeModuleScript(Require.java:342)
        at org.mozilla.javascript.commonjs.module.Require.getExportedModuleInterface(Require.java:290)
        at org.mozilla.javascript.commonjs.module.Require.call(Require.java:219)
        at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
        at org.mozilla.javascript.gen.abc_js_2._c_script_0(abc.js:1)
        at org.mozilla.javascript.gen.abc_js_2.call(abc.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)
        at org.mozilla.javascript.gen.abc_js_2.call(abc.js)
        at org.mozilla.javascript.gen.abc_js_2.exec(abc.js)
        at org.mozilla.javascript.commonjs.module.Require.executeModuleScript(Require.java:342)
        at org.mozilla.javascript.commonjs.module.Require.getExportedModuleInterface(Require.java:290)
        at org.mozilla.javascript.commonjs.module.Require.requireMain(Require.java:137)
        at net.kimleo.rec.v2.scripting.Scripting.runReader(Scripting.java:34)
        at net.kimleo.rec.v2.scripting.Scripting.runfile(Scripting.java:22)
        at net.kimleo.rec.App.execute(App.java:66)
        at net.kimleo.rec.App.main(App.java:28)

Discovered when spike #34

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.