1. Use HoodieLogFormat to archive commits and other actions 2. Introduced avro schema for commits and compactions and an avro wrapper schema
This commit is contained in:
committed by
vinoth chandar
parent
616c9a68c3
commit
19c22b231e
55
hoodie-common/src/main/avro/HoodieArchivedMetaEntry.avsc
Normal file
55
hoodie-common/src/main/avro/HoodieArchivedMetaEntry.avsc
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"type":"record",
|
||||
"name":"HoodieArchivedMetaEntry",
|
||||
"namespace":"com.uber.hoodie.avro.model",
|
||||
"fields":[
|
||||
{
|
||||
"name":"hoodieCommitMetadata",
|
||||
"type":[
|
||||
"null",
|
||||
"HoodieCommitMetadata"
|
||||
],
|
||||
"default": "null"
|
||||
},
|
||||
{
|
||||
"name":"hoodieCleanMetadata",
|
||||
"type":[
|
||||
"null",
|
||||
"HoodieCleanMetadata"
|
||||
],
|
||||
"default": "null"
|
||||
},
|
||||
{
|
||||
"name":"hoodieCompactionMetadata",
|
||||
"type":[
|
||||
"null",
|
||||
"HoodieCompactionMetadata"
|
||||
],
|
||||
"default": "null"
|
||||
},
|
||||
{
|
||||
"name":"hoodieRollbackMetadata",
|
||||
"type":[
|
||||
"null",
|
||||
"HoodieRollbackMetadata"
|
||||
],
|
||||
"default": "null"
|
||||
},
|
||||
{
|
||||
"name":"hoodieSavePointMetadata",
|
||||
"type":[
|
||||
"null",
|
||||
"HoodieSavepointMetadata"
|
||||
],
|
||||
"default": "null"
|
||||
},
|
||||
{
|
||||
"name":"commitTime",
|
||||
"type":["null","string"]
|
||||
},
|
||||
{
|
||||
"name":"actionType",
|
||||
"type":["null","string"]
|
||||
}
|
||||
]
|
||||
}
|
||||
61
hoodie-common/src/main/avro/HoodieCommitMetadata.avsc
Normal file
61
hoodie-common/src/main/avro/HoodieCommitMetadata.avsc
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"namespace":"com.uber.hoodie.avro.model",
|
||||
"type":"record",
|
||||
"name":"HoodieCommitMetadata",
|
||||
"fields":[
|
||||
{
|
||||
"name":"partitionToWriteStats",
|
||||
"type":["null", {
|
||||
"type":"map",
|
||||
"values":{
|
||||
"type":"array",
|
||||
"items":{
|
||||
"name":"HoodieWriteStat",
|
||||
"type":"record",
|
||||
"fields":[
|
||||
{
|
||||
"name":"fileId",
|
||||
"type":["null","string"]
|
||||
},
|
||||
{
|
||||
"name":"path",
|
||||
"type":["null","string"]
|
||||
},
|
||||
{
|
||||
"name":"prevCommit",
|
||||
"type":["null","string"]
|
||||
},
|
||||
{
|
||||
"name":"numWrites",
|
||||
"type":["null","long"]
|
||||
},
|
||||
{
|
||||
"name":"numDeletes",
|
||||
"type":["null","long"]
|
||||
},
|
||||
{
|
||||
"name":"numUpdateWrites",
|
||||
"type":["null","long"]
|
||||
},
|
||||
{
|
||||
"name":"totalWriteBytes",
|
||||
"type":["null","long"]
|
||||
},
|
||||
{
|
||||
"name":"totalWriteErrors",
|
||||
"type":["null","long"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"name":"extraMetadata",
|
||||
"type":["null", {
|
||||
"type":"map",
|
||||
"values":"string"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
42
hoodie-common/src/main/avro/HoodieCompactionMetadata.avsc
Normal file
42
hoodie-common/src/main/avro/HoodieCompactionMetadata.avsc
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"namespace":"com.uber.hoodie.avro.model",
|
||||
"type":"record",
|
||||
"name":"HoodieCompactionMetadata",
|
||||
"fields":[
|
||||
{
|
||||
"name":"partitionToCompactionWriteStats",
|
||||
"type": ["null", {
|
||||
"type":"map",
|
||||
"values":{
|
||||
"type":"array",
|
||||
"items":{
|
||||
"name":"HoodieCompactionWriteStat",
|
||||
"type":"record",
|
||||
"fields":[
|
||||
{
|
||||
"name":"partitionPath",
|
||||
"type":["null","string"]
|
||||
},
|
||||
{
|
||||
"name":"totalLogRecords",
|
||||
"type":["null","long"]
|
||||
},
|
||||
{
|
||||
"name":"totalLogFiles",
|
||||
"type":["null","long"]
|
||||
},
|
||||
{
|
||||
"name":"totalRecordsToBeUpdate",
|
||||
"type":["null","long"]
|
||||
},
|
||||
{
|
||||
"name":"hoodieWriteStat",
|
||||
"type":["null","HoodieWriteStat"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user