Incorporating code review feedback for DataSource
This commit is contained in:
committed by
vinoth chandar
parent
64e0573aca
commit
274aaf49fe
@@ -59,7 +59,8 @@ public class DataSourceUtils {
|
||||
if (i == parts.length - 1) {
|
||||
return val.toString();
|
||||
} else {
|
||||
if (val instanceof GenericRecord) {
|
||||
// VC: Need a test here
|
||||
if (!(val instanceof GenericRecord)) {
|
||||
throw new HoodieException("Cannot find a record at part value :" + part);
|
||||
}
|
||||
valueNode = (GenericRecord) val;
|
||||
@@ -80,7 +81,7 @@ public class DataSourceUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a payload class via reflection, passing in an ordering/precombine value value.
|
||||
* Create a payload class via reflection, passing in an ordering/precombine value.
|
||||
*/
|
||||
public static HoodieRecordPayload createPayload(String payloadClass, GenericRecord record, Comparable orderingVal) throws IOException {
|
||||
try {
|
||||
|
||||
@@ -49,7 +49,6 @@ public class HoodieDataSourceHelpers {
|
||||
* Get a list of instant times that have occurred, from the given instant timestamp.
|
||||
*
|
||||
* @param instantTimestamp
|
||||
* @return
|
||||
*/
|
||||
public static List<String> listCommitsSince(FileSystem fs, String basePath, String instantTimestamp) {
|
||||
HoodieTimeline timeline = allCompletedCommitsCompactions(fs, basePath);
|
||||
@@ -71,7 +70,6 @@ public class HoodieDataSourceHelpers {
|
||||
*
|
||||
* @param fs
|
||||
* @param basePath
|
||||
* @return
|
||||
*/
|
||||
public static HoodieTimeline allCompletedCommitsCompactions(FileSystem fs, String basePath) {
|
||||
HoodieTable table = HoodieTable
|
||||
|
||||
@@ -38,9 +38,9 @@ object DataSourceReadOptions {
|
||||
* Default: READ_OPTIMIZED
|
||||
*/
|
||||
val VIEW_TYPE_OPT_KEY = "hoodie.datasource.view.type"
|
||||
val VIEW_TYPE_READ_OPTIMIZED_OPT_VAL = "READ_OPTIMIZED"
|
||||
val VIEW_TYPE_INCREMENTAL_OPT_VAL = "INCREMENTAL"
|
||||
val VIEW_TYPE_REALTIME_OPT_VAL = "REALTIME"
|
||||
val VIEW_TYPE_READ_OPTIMIZED_OPT_VAL = "read_optimized"
|
||||
val VIEW_TYPE_INCREMENTAL_OPT_VAL = "incremental"
|
||||
val VIEW_TYPE_REALTIME_OPT_VAL = "realtime"
|
||||
val DEFAULT_VIEW_TYPE_OPT_VAL = VIEW_TYPE_READ_OPTIMIZED_OPT_VAL
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ object DataSourceWriteOptions {
|
||||
|
||||
/**
|
||||
* The storage type for the underlying data, for this write.
|
||||
* Note that this can't change across writes.
|
||||
*
|
||||
* Default: COPY_ON_WRITE
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user