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
@@ -0,0 +1,32 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.hadoop.ozone.om.eventlistener;

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

/**
* Interface for event listener plugin implementations.
*/
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,38 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

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();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* This package contains classes for the OM Event Listener implementation.
*/
package org.apache.hadoop.ozone.om.eventlistener;
2 changes: 2 additions & 0 deletions hadoop-ozone/dist/src/main/license/bin/LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ CDDL 1.1 + GPLv2 with classpath exception
Apache License 2.0
=====================

at.yawk.lz4:lz4-java
ch.qos.reload4j:reload4j
com.amazonaws:aws-java-sdk-core
com.amazonaws:aws-java-sdk-kms
Expand Down Expand Up @@ -384,6 +385,7 @@ Apache License 2.0
org.apache.hadoop:hadoop-shaded-guava
org.apache.hadoop:hadoop-shaded-protobuf_3_25
org.apache.httpcomponents:httpcore
org.apache.kafka:kafka-clients
org.apache.kerby:kerb-admin
org.apache.kerby:kerb-client
org.apache.kerby:kerb-common
Expand Down
3 changes: 3 additions & 0 deletions hadoop-ozone/dist/src/main/license/jar-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ share/ozone/lib/json-simple.jar
share/ozone/lib/jsp-api.jar
share/ozone/lib/jspecify.jar
share/ozone/lib/jsr311-api.jar
share/ozone/lib/kafka-clients.jar
share/ozone/lib/kerb-core.jar
share/ozone/lib/kerb-crypto.jar
share/ozone/lib/kerb-util.jar
Expand All @@ -170,6 +171,7 @@ share/ozone/lib/kotlin-stdlib.jar
share/ozone/lib/listenablefuture-empty-to-avoid-conflict-with-guava.jar
share/ozone/lib/log4j-api.jar
share/ozone/lib/log4j-core.jar
share/ozone/lib/lz4-java.jar
share/ozone/lib/metrics-core.jar
share/ozone/lib/netty-buffer.Final.jar
share/ozone/lib/netty-codec.Final.jar
Expand Down Expand Up @@ -227,6 +229,7 @@ share/ozone/lib/ozone-insight.jar
share/ozone/lib/ozone-interface-client.jar
share/ozone/lib/ozone-interface-storage.jar
share/ozone/lib/ozone-manager.jar
share/ozone/lib/ozone-manager-plugins.jar
share/ozone/lib/ozone-multitenancy-ranger.jar
share/ozone/lib/ozone-reconcodegen.jar
share/ozone/lib/ozone-recon.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,17 @@ ListSnapshotResponse listSnapshot(
List<OmVolumeArgs> listVolumes(String userName, String prefix,
String startKey, int maxKeys) throws IOException;

/**
* Returns a list of operation info objects.
*
* @param startKey the start key determines where to start listing
* from, this key is excluded from the result.
* @param maxResults the maximum number of results to return.
* @return a list of {@link OmCompletedRequestInfo}
* @throws IOException
*/
List<OmCompletedRequestInfo> listCompletedRequestInfo(String startKey, int maxResults) throws IOException;

/**
* Returns the names of up to {@code count} open keys whose age is
* greater than or equal to {@code expireThreshold}.
Expand Down
77 changes: 77 additions & 0 deletions hadoop-ozone/ozone-manager-plugins/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.ozone</groupId>
<artifactId>ozone</artifactId>
<version>2.2.0-SNAPSHOT</version>
</parent>
<artifactId>ozone-manager-plugins</artifactId>
<version>2.2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Apache Ozone Manager Plugins</name>
<properties>
<classpath.skip>false</classpath.skip>
<file.encoding>UTF-8</file.encoding>
</properties>

<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-server-framework</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>ozone-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>ozone-interface-client</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<proc>none</proc>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading