[HUDI-1072] Introduce REPLACE top level action. Implement insert_overwrite operation on top of replace action (#2048)
This commit is contained in:
@@ -96,6 +96,14 @@
|
||||
"name":"actionState",
|
||||
"type":["null","string"],
|
||||
"default": null
|
||||
},
|
||||
{
|
||||
"name":"hoodieReplaceCommitMetadata",
|
||||
"type":[
|
||||
"null",
|
||||
"HoodieReplaceCommitMetadata"
|
||||
],
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
32
hudi-common/src/main/avro/HoodieInstantInfo.avsc
Normal file
32
hudi-common/src/main/avro/HoodieInstantInfo.avsc
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
{
|
||||
"namespace":"org.apache.hudi.avro.model",
|
||||
"type":"record",
|
||||
"name":"HoodieInstantInfo",
|
||||
"fields":[
|
||||
{
|
||||
"name":"commitTime",
|
||||
"type":"string"
|
||||
},
|
||||
{
|
||||
"name":"action",
|
||||
"type":"string"
|
||||
}
|
||||
]
|
||||
}
|
||||
64
hudi-common/src/main/avro/HoodieReplaceCommitMetadata.avsc
Normal file
64
hudi-common/src/main/avro/HoodieReplaceCommitMetadata.avsc
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
{
|
||||
"namespace":"org.apache.hudi.avro.model",
|
||||
"type":"record",
|
||||
"name":"HoodieReplaceCommitMetadata",
|
||||
"fields":[
|
||||
{
|
||||
"name":"partitionToWriteStats",
|
||||
"type":["null", {
|
||||
"type":"map",
|
||||
"values":{
|
||||
"type":"array",
|
||||
"items":"HoodieWriteStat"
|
||||
}
|
||||
}],
|
||||
"default": null
|
||||
},
|
||||
{
|
||||
"name":"extraMetadata",
|
||||
"type":["null", {
|
||||
"type":"map",
|
||||
"values":"string"
|
||||
}],
|
||||
"default": null
|
||||
},
|
||||
{
|
||||
"name":"version",
|
||||
"type":["int", "null"],
|
||||
"default": 1
|
||||
},
|
||||
{
|
||||
"name":"operationType",
|
||||
"type": ["null","string"],
|
||||
"default":null
|
||||
},
|
||||
{
|
||||
"name":"partitionToReplaceFileIds",
|
||||
"type":["null", {
|
||||
"type":"map",
|
||||
"values":{
|
||||
"type":"array",
|
||||
"items": "string"
|
||||
}
|
||||
}],
|
||||
"default": null
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -34,6 +34,16 @@
|
||||
"name":"version",
|
||||
"type":["int", "null"],
|
||||
"default": 1
|
||||
},
|
||||
/* overlaps with 'instantsToRollback' field. Adding this to track action type for all the instants being rolled back. */
|
||||
{
|
||||
"name": "restoreInstantInfo",
|
||||
"default": null,
|
||||
"type": {
|
||||
"type": "array",
|
||||
"default": null,
|
||||
"items": "HoodieInstantInfo"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -39,6 +39,16 @@
|
||||
"name":"version",
|
||||
"type":["int", "null"],
|
||||
"default": 1
|
||||
},
|
||||
/* overlaps with 'commitsRollback' field. Adding this to track action type for all the instants being rolled back. */
|
||||
{
|
||||
"name": "instantsRollback",
|
||||
"default": null,
|
||||
"type": {
|
||||
"type": "array",
|
||||
"default": null,
|
||||
"items": "HoodieInstantInfo"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user