Co-authored-by: Andras Gyori <gandras@cloudera.com> (cherry picked from commit b4a524722a2466ede935aefd7b24a1e08fdbf076)