Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,11 @@ public final class OzoneConsts {
public static final String COMPACTION_LOG_TABLE =
"compactionLogTable";

/**
* DB completed request info table name. Referenced in RDBStore.
*/
public static final String COMPLETED_REQUEST_INFO_TABLE = "completedRequestInfoTable";

/**
* S3G multipart upload request's ETag header key.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.apache.hadoop.ozone.om.eventlistener;

import java.io.IOException;

/**
* Interface for implementations which load/save the current checkpoint
* position representing the last known notification sent by an event
* notification plugin.
*/
public interface NotificationCheckpointStrategy {

String load() throws IOException;

void save(String val) throws IOException;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.apache.hadoop.ozone.om.eventlistener;

import org.apache.hadoop.hdds.conf.OzoneConfiguration;

public interface OMEventListener {

void initialize(OzoneConfiguration conf, OMEventListenerPluginContext pluginContext);

void start();

void shutdown();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.apache.hadoop.ozone.om.eventlistener;

import java.io.IOException;
import java.util.List;
import org.apache.hadoop.ozone.om.helpers.OmCompletedRequestInfo;

/**
* A narrow set of functionality we are ok with exposing to plugin
* implementations
*/
public interface OMEventListenerPluginContext {

boolean isLeaderReady();

// TODO: should we allow plugins to pass in maxResults or just limit
// them to some predefined value for safety? e.g. 10K
List<OmCompletedRequestInfo> listCompletedRequestInfo(String startKey, int maxResults) throws IOException;

// XXX: this probably doesn't belong here
String getThreadNamePrefix();

NotificationCheckpointStrategy getOzoneNotificationCheckpointStrategy();

}
Loading