Comments (7)
See Spark, which uses untyped Key-Value pairs: https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkConf.scala#L30
from macrobase.
IMO KV pairs seem like they would scale much better to more config flags, which is inevitable as the codebase progresses. Not sure how exactly the untyped stuff would work in Java though. And we would need to keep good, up-to-date documentation on all the config options in one file.
from macrobase.
Spark has a good example of typing:
Double getDouble(String param)
, String getString(String param)
It gets a little annoying to have a bunch of these, like List<String> getStringList(String param)
You can imagine also having:
Double getDoubleOrElse(String param, Double default)
And:
Boolean mandatoryParams(List<String> params)
.
from macrobase.
I started writing a new config class. Two things:
- Do we want to rename all
MacroBase
files toMacrobase
? - Spark's configuration API forces you to specify a default for each setting. The upside of this is it makes the behavior explicit. The downside is that this makes it awkward to enforce mandatory fields (e.g.,
targetLowMetrics
). Which do we prefer?
751ae21#diff-a68be5bcbbbf7f3d53f49b90310d3e59R11
from macrobase.
I like the idea of defaults for the most part, since most of our parameters do have default values. For those that don't, we can have a default value like null
, and then throw an exception if any argument is null
.
from macrobase.
I like defaults too. the only thing that we require are the sql query, metrics and attributes. and those seem hard to forget :)
Also since we are moving to automating everything, we should in the end have defaults for everything, no?
from macrobase.
See #77.
from macrobase.
Related Issues (20)
- Bump DropWizard version to work with JDK 9
- WindowedOperator initial value
- Can't view pictures in tutorial HOT 4
- Time Complexity of the Algorithm? HOT 1
- [Feature Request] Select All as Explanatory Variable HOT 1
- [Feature Request] Enlarge the graph (through button or dragging or just set height and width maybe?) HOT 1
- Toggle tuple/table output in SQL
- SQL: redundant explanations (probably) should be collapsed by pruning rules HOT 1
- SQL: counts should be integers HOT 1
- Test fails because of locale HOT 1
- CSVDataFrameParser fails on null in double columns HOT 1
- MacroBase SQL tests fail because of spaces in path
- How can I print threshold beyond which MAD classifies a metric as outliers? HOT 1
- Issues with MacroBase streaming mode explanations
- Bug in risk ratio formula and boundary condition in legacy and lib source code files
- Question on MacrobaseSQL Syntax and Schema HOT 1
- test failure while building macrobase HOT 2
- [Error] Multiple servlets map to path:
- Publish to maven
- How to pass csv data as body to rest server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from macrobase.