Skip to content

Commit

Permalink
apache#5550 add operationType
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuQhahah committed Nov 22, 2024
1 parent 5573d19 commit abb2fe4
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,14 @@ public AddPartitionPreEvent(
public PartitionInfo createdPartitionRequest() {
return createPartitionRequest;
}

/**
* Returns the type of operation.
*
* @return the operation type.
*/
@Override
public OperationType operationType() {
return OperationType.ADD_PARTITION;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,14 @@ public DropPartitionPreEvent(String user, NameIdentifier identifier, String part
public String partitionName() {
return partitionName;
}

/**
* Returns the type of operation.
*
* @return the operation type.
*/
@Override
public OperationType operationType() {
return OperationType.DROP_PARTITION;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,14 @@ public GetPartitionPreEvent(String user, NameIdentifier identifier, String parti
public String partitionName() {
return partitionName;
}

/**
* Returns the type of operation.
*
* @return the operation type.
*/
@Override
public OperationType operationType() {
return OperationType.LOAD_PARTITION;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,14 @@ public class ListPartitionNamesPreEvent extends PartitionPreEvent {
public ListPartitionNamesPreEvent(String user, NameIdentifier identifier) {
super(user, identifier);
}

/**
* Returns the type of operation.
*
* @return the operation type.
*/
@Override
public OperationType operationType() {
return OperationType.LIST_PARTITION_NAMES;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,13 @@ public class ListPartitionPreEvent extends PartitionPreEvent {
public ListPartitionPreEvent(String user, NameIdentifier identifier) {
super(user, identifier);
}
/**
* Returns the type of operation.
*
* @return the operation type.
*/
@Override
public OperationType operationType() {
return OperationType.LIST_PARTITION;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@ public PurgePartitionPreEvent(String user, NameIdentifier identifier, String par
public String partitionName() {
return partitionName;
}
/**
* Returns the type of operation.
*
* @return the operation type.
*/
@Override
public OperationType operationType() {
return OperationType.PURGE_PARTITION;
}
}

0 comments on commit abb2fe4

Please sign in to comment.