[ https://issues.apache.org/jira/browse/GOBBLIN-1179?focusedWorklogId=441055&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-441055 ]
ASF GitHub Bot logged work on GOBBLIN-1179: ------------------------------------------- Author: ASF GitHub Bot Created on: 04/Jun/20 00:47 Start Date: 04/Jun/20 00:47 Worklog Time Spent: 10m Work Description: asfgit closed pull request #2910: URL: https://github.com/apache/incubator-gobblin/pull/2910 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 441055) Time Spent: 0.5h (was: 20m) > Add a typed config to replace properties > ---------------------------------------- > > Key: GOBBLIN-1179 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1179 > Project: Apache Gobblin > Issue Type: Task > Reporter: Alex Li > Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > Add a typed config to replace *_properties.get(“ini.file.userName”)_* with > *config.userName* > The gobblin config file is an ini file. Java loads the ini file to a > properties instance. The way to use the config information is to get from the > properties. > |workUnitState.getPropAsBoolean(BULK_API_USE_QUERY_ALL)| > |workUnitState.getPropAsInt(FETCH_RETRY_LIMIT_KEY, DEFAULT_FETCH_RETRY_LIMIT)| > |Math.max(MIN_SIZE,Math.min(MAX_SIZE, > workUnitState.getPropAsInt(PARTITION_SIZE, DEFAULT_SIZE))); > // partition size must be >= min and <= max, otherwise use default| > Problems > # No consistent key naming model > * A long dot-separated key string is used, easy to run into typos. The > config code is pretty verbose: We use *properties.getProp(key, default)* > * Key collision if the same type is used in multiple places, e.g > kafka.brokers > # No ownership management > * in gobblin connector package: We have multiple constant static classes. > GobblinKeys, QueryBaseKeys, GaapKeys, and SalesforceConnectorKeys.We can even > directly read config values by state.getProp(*“my.key”*) without creating any > constant key. > # No static validation > * Required & default value > * Type check > * Date range > * Enum > # No dependency check > * If users set to *useGaap=true*, there must be *gaap.url* and > *gaap.credential*. And this needs to be verified at both runtime and compile > time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)