Example Analysis of Hive Udf Rank
The editor will share with you the example analysis of Hive Udf Rank. I hope you will get something after reading this article. Let's discuss it together.
Public final class Rank extends UDF {private int counter; private String last_dp_id; private String last_tid; / / Multi-parameter public int evaluate (String dp_id, String tid) {if (dp_id.equalsIgnoreCase (this.last_dp_id) & & tid.equalsIgnoreCase (this.last_tid)) {this.counter++ } else {this.counter = 0; this.last_dp_id = dp_id; this.last_tid = tid;} return this.counter } / / one parameter public int evaluate (final String tid) {if (! tid.equals (this.last_tid)) {this.counter = 0; this.last_tid = tid;} return this.counter++ }} after reading this article, I believe you have some understanding of "sample Analysis of Hive Udf Rank". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!