MyBatis executing multiple sql statements in one go, is that possible?

I’m using myBatis with Oracle. I guess there is something similar in other DB. Actually you always can create procedures in DB, which usually is better for the future, when you have to support the project. <delete id=”deleteUnfinishedData” parameterType=”map”> {call declare begin delete from TABLE1 where id = #{valueFromMap1}; delete from TABLE2 where id = … Read more

How to efficiently map a org.json.JSONObject to a POJO?

Since you have an abstract representation of some JSON data (an org.json.JSONObject object) and you’re planning to use the Jackson library – that has its own abstract representation of JSON data (com.fasterxml.jackson.databind.JsonNode) – then a conversion from one representation to the other would save you from the parse-serialize-parse process. So, instead of using the readValue … Read more

how many mappers and reduces will get created for a partitoned table in hive

Mappers: Number of mappers depends on various factors such as how the data is distributed among nodes, input format, execution engine and configuration params. See also here: https://cwiki.apache.org/confluence/display/TEZ/How+initial+task+parallelism+works MR uses CombineInputFormat, while Tez uses grouped splits. Tez: set tez.grouping.min-size=16777216; — 16 MB min split set tez.grouping.max-size=1073741824; — 1 GB max split MapReduce: set mapreduce.input.fileinputformat.split.minsize=16777216; — … Read more