Hi, I'm trying to write on HBase using writeOutputFormat using a custom HBase format inspired from this example in flink-hbase (mind you, I'm using Scala instead of Java) and encountering the error reported in the mail object.abstract class HBaseOutputFormat[T](tableDescriptor: HTableDescriptor, confPath : Path) extends OutputFormat[T]{ which is inherited by the actual format used, that implements the writeRecord method with BatchContainer beingI'd like to ask you: what needs to be Serializable? As far as I see, conf, connection and table are not Serializable and so they are surely part of the issue. Are the constructor parameters, especially tableDescriptor which is not Serializable, to be considered in this case? Should all the methods implemented from the OutputFormat interface contain only Serializable variables?
|
It looks like that in your case everything should be serializable. An alternative would be to mark certain non-serializable things as transient, but as far as I see this is not possible in your case.
|
Hi, could you elaborate, please? Marking conf, connection and table as transient wouldn't help because of the presence of the HTableDescriptor reference? 2017-08-27 12:44 GMT+02:00 Jörn Franke <[hidden email]>:
|
Hello everyone, I solved my issue by using an Array[Byte] as a parameter, instead of the explicit HTableDescriptor parameter. This way I can instantiate the TableDescriptor inside the open method of OutputFormat using the static method HTableDescriptor.parseFrom. In the end, marking conf, table and connection as transient wouldn't make any difference.2017-08-27 14:22 GMT+02:00 Federico D'Ambrosio <[hidden email]>:
|
Free forum by Nabble | Edit this page |