Commit eb63e1f 1 parent 9246fd7 commit eb63e1f Copy full SHA for eb63e1f
File tree 2 files changed +8
-6
lines changed
hudi-aws/src/main/java/org/apache/hudi/aws/transaction/lock
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/transaction/lock
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 47
47
48
48
import javax .annotation .concurrent .NotThreadSafe ;
49
49
50
+ import java .io .Serializable ;
50
51
import java .net .URI ;
51
52
import java .util .ArrayList ;
52
53
import java .util .Collection ;
58
59
* using DynamoDB. Users need to have access to AWS DynamoDB to be able to use this lock.
59
60
*/
60
61
@ NotThreadSafe
61
- public class DynamoDBBasedLockProvider implements LockProvider <LockItem > {
62
+ public class DynamoDBBasedLockProvider implements LockProvider <LockItem >, Serializable {
62
63
63
64
private static final Logger LOG = LoggerFactory .getLogger (DynamoDBBasedLockProvider .class );
64
65
65
66
private static final String DYNAMODB_ATTRIBUTE_NAME = "key" ;
66
67
67
- private final AmazonDynamoDBLockClient client ;
68
+ private final transient AmazonDynamoDBLockClient client ;
68
69
private final String tableName ;
69
70
private final String dynamoDBPartitionKey ;
70
71
protected final DynamoDbBasedLockConfig dynamoDBLockConfiguration ;
Original file line number Diff line number Diff line change 44
44
import org .slf4j .Logger ;
45
45
import org .slf4j .LoggerFactory ;
46
46
47
+ import java .io .Serializable ;
47
48
import java .util .concurrent .ExecutionException ;
48
49
import java .util .concurrent .Executors ;
49
50
import java .util .concurrent .ScheduledExecutorService ;
75
76
* using hive metastore APIs. Users need to have a HiveMetastore & Zookeeper cluster deployed to be able to use this lock.
76
77
*
77
78
*/
78
- public class HiveMetastoreBasedLockProvider implements LockProvider <LockResponse > {
79
+ public class HiveMetastoreBasedLockProvider implements LockProvider <LockResponse >, Serializable {
79
80
80
81
private static final Logger LOG = LoggerFactory .getLogger (HiveMetastoreBasedLockProvider .class );
81
82
82
83
private final String databaseName ;
83
84
private final String tableName ;
84
85
private final String hiveMetastoreUris ;
85
- private IMetaStoreClient hiveClient ;
86
+ private transient IMetaStoreClient hiveClient ;
86
87
private volatile LockResponse lock = null ;
87
88
protected LockConfiguration lockConfiguration ;
88
- private ScheduledFuture <?> future = null ;
89
- private final ScheduledExecutorService executor = Executors .newScheduledThreadPool (2 );
89
+ private transient ScheduledFuture <?> future = null ;
90
+ private final transient ScheduledExecutorService executor = Executors .newScheduledThreadPool (2 );
90
91
91
92
public HiveMetastoreBasedLockProvider (final LockConfiguration lockConfiguration , final StorageConfiguration <?> conf ) {
92
93
this (lockConfiguration );
You can’t perform that action at this time.
0 commit comments