Skip to content

Commit

Permalink
Renamed Java packages from com.yahoo.pulsar to org.apache.pulsar (apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat committed Jun 23, 2017
1 parent 59a952d commit 70da31b
Show file tree
Hide file tree
Showing 560 changed files with 4,774 additions and 5,418 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
import org.apache.bookkeeper.mledger.util.Pair;
import org.apache.bookkeeper.util.OrderedSafeExecutor;
import org.apache.bookkeeper.util.UnboundArrayBlockingQueue;
import org.apache.pulsar.common.api.Commands;
import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata;
import org.apache.pulsar.common.util.collections.ConcurrentLongHashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -82,9 +85,6 @@
import com.google.common.collect.Queues;
import com.google.common.collect.Range;
import com.google.common.util.concurrent.RateLimiter;
import com.yahoo.pulsar.common.api.Commands;
import com.yahoo.pulsar.common.api.proto.PulsarApi.MessageMetadata;
import com.yahoo.pulsar.common.util.collections.ConcurrentLongHashMap;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import com.yahoo.pulsar.common.naming.DestinationName;
import com.yahoo.pulsar.common.policies.data.PersistentOfflineTopicStats;
import com.yahoo.pulsar.common.util.collections.ConcurrentOpenHashMap;

import org.apache.bookkeeper.client.AsyncCallback;
import org.apache.bookkeeper.client.BKException;
import org.apache.bookkeeper.client.BookKeeper;
Expand All @@ -38,6 +34,9 @@
import org.apache.bookkeeper.client.LedgerHandle;
import org.apache.bookkeeper.mledger.ManagedLedgerException;
import org.apache.bookkeeper.mledger.proto.MLDataFormats;
import org.apache.pulsar.common.naming.DestinationName;
import org.apache.pulsar.common.policies.data.PersistentOfflineTopicStats;
import org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
import org.apache.bookkeeper.mledger.ManagedLedgerFactoryConfig;
import org.apache.bookkeeper.mledger.Position;
import org.apache.bookkeeper.test.BookKeeperClusterTestCase;
import org.apache.pulsar.common.policies.data.PersistentOfflineTopicStats;
import org.testng.annotations.Test;

import com.google.common.base.Charsets;
import com.google.common.collect.Lists;
import com.yahoo.pulsar.common.policies.data.PersistentOfflineTopicStats;

public class ManagedLedgerBkTest extends BookKeeperClusterTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
import org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo;
import org.apache.bookkeeper.mledger.util.Pair;
import org.apache.bookkeeper.test.MockedBookKeeperTestCase;
import org.apache.pulsar.common.api.DoubleByteBuf;
import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata;
import org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException.Code;
import org.apache.zookeeper.ZooDefs;
Expand All @@ -78,9 +81,6 @@

import com.google.common.base.Charsets;
import com.google.common.collect.Sets;
import com.yahoo.pulsar.common.api.DoubleByteBuf;
import com.yahoo.pulsar.common.api.proto.PulsarApi.MessageMetadata;
import com.yahoo.pulsar.common.util.protobuf.ByteBufCodedOutputStream;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.PooledByteBufAllocator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import java.io.IOException;
import java.net.SocketAddress;
Expand All @@ -25,15 +25,15 @@

import javax.naming.AuthenticationException;

import org.apache.pulsar.broker.authentication.AuthenticationDataSource;
import org.apache.pulsar.broker.authentication.AuthenticationProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.collect.Lists;
import com.yahoo.athenz.auth.token.RoleToken;
import com.yahoo.athenz.zpe.AuthZpeClient;
import com.yahoo.pulsar.broker.ServiceConfiguration;
import com.yahoo.pulsar.broker.authentication.AuthenticationDataSource;
import com.yahoo.pulsar.broker.authentication.AuthenticationProvider;
import org.apache.pulsar.broker.ServiceConfiguration;

public class AuthenticationProviderAthenz implements AuthenticationProvider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeClass;

import org.apache.bookkeeper.test.PortManager;
import org.apache.pulsar.broker.authentication.AuthenticationDataCommand;
import org.apache.pulsar.broker.authentication.AuthenticationDataSource;
import org.apache.pulsar.broker.authentication.AuthenticationProviderAthenz;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -35,11 +38,7 @@

import com.yahoo.athenz.zpe.ZpeConsts;
import com.yahoo.athenz.auth.token.RoleToken;

import com.yahoo.pulsar.broker.authentication.AuthenticationProviderAthenz;
import com.yahoo.pulsar.broker.authentication.AuthenticationDataSource;
import com.yahoo.pulsar.broker.authentication.AuthenticationDataCommand;
import com.yahoo.pulsar.broker.ServiceConfiguration;
import org.apache.pulsar.broker.ServiceConfiguration;

public class AuthenticationProviderAthenzTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker;
package org.apache.pulsar.broker;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker;
package org.apache.pulsar.broker;

import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.Set;

import org.apache.pulsar.client.impl.auth.AuthenticationDisabled;
import org.apache.pulsar.common.configuration.FieldContext;
import org.apache.pulsar.common.configuration.PulsarConfiguration;

import com.google.common.collect.Sets;
import com.yahoo.pulsar.client.impl.auth.AuthenticationDisabled;
import com.yahoo.pulsar.common.configuration.FieldContext;
import com.yahoo.pulsar.common.configuration.PulsarConfiguration;

/**
*
Expand Down Expand Up @@ -277,7 +278,7 @@ public class ServiceConfiguration implements PulsarConfiguration {
private Properties properties = new Properties();
// Name of load manager to use
@FieldContext(dynamic = true)
private String loadManagerClassName = "com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl";
private String loadManagerClassName = "org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl";
// If true, (and ModularLoadManagerImpl is being used), the load manager will attempt to
// use only brokers running the latest software version (to minimize impact to bundles)
@FieldContext(dynamic = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker;
package org.apache.pulsar.broker;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import java.net.SocketAddress;
import java.security.cert.Certificate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import java.net.InetSocketAddress;
import java.net.SocketAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import java.security.cert.X509Certificate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import java.net.SocketAddress;
import java.security.cert.Certificate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import java.io.Closeable;
import java.io.IOException;

import javax.naming.AuthenticationException;

import com.yahoo.pulsar.broker.ServiceConfiguration;
import org.apache.pulsar.broker.ServiceConfiguration;

/**
* Provider of authentication mechanism
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import java.io.IOException;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;

import javax.naming.AuthenticationException;

import com.yahoo.pulsar.broker.ServiceConfiguration;
import org.apache.pulsar.broker.ServiceConfiguration;

public class AuthenticationProviderTls implements AuthenticationProvider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authentication;
package org.apache.pulsar.broker.authentication;

import java.io.Closeable;
import java.io.IOException;
Expand All @@ -25,12 +25,12 @@
import javax.naming.AuthenticationException;
import javax.servlet.http.HttpServletRequest;

import org.apache.pulsar.broker.PulsarServerException;
import org.apache.pulsar.broker.ServiceConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.collect.Maps;
import com.yahoo.pulsar.broker.PulsarServerException;
import com.yahoo.pulsar.broker.ServiceConfiguration;

/**
* Authentication service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.authorization;
package org.apache.pulsar.broker.authorization;

import java.util.Map;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.pulsar.zookeeper.ZooKeeperCache.cacheTimeOutInSec;

import org.apache.pulsar.broker.ServiceConfiguration;
import org.apache.pulsar.broker.cache.ConfigurationCacheService;
import org.apache.pulsar.common.naming.DestinationName;
import org.apache.pulsar.common.policies.data.AuthAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.yahoo.pulsar.broker.ServiceConfiguration;
import com.yahoo.pulsar.broker.cache.ConfigurationCacheService;
import com.yahoo.pulsar.common.naming.DestinationName;
import com.yahoo.pulsar.common.policies.data.AuthAction;
import static com.yahoo.pulsar.zookeeper.ZooKeeperCache.cacheTimeOutInSec;

/**
*/
public class AuthorizationManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.broker.cache;
package org.apache.pulsar.broker.cache;

import java.util.Map;

import org.apache.bookkeeper.util.ZkUtils;
import org.apache.pulsar.broker.PulsarServerException;
import org.apache.pulsar.common.policies.data.ClusterData;
import org.apache.pulsar.common.policies.data.NamespaceIsolationData;
import org.apache.pulsar.common.policies.data.Policies;
import org.apache.pulsar.common.policies.data.PropertyAdmin;
import org.apache.pulsar.common.policies.impl.NamespaceIsolationPolicies;
import org.apache.pulsar.common.util.ObjectMapperFactory;
import org.apache.pulsar.zookeeper.ZooKeeperCache;
import org.apache.pulsar.zookeeper.ZooKeeperChildrenCache;
import org.apache.pulsar.zookeeper.ZooKeeperDataCache;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooDefs.Ids;
Expand All @@ -29,16 +39,6 @@
import org.slf4j.LoggerFactory;

import com.fasterxml.jackson.core.type.TypeReference;
import com.yahoo.pulsar.broker.PulsarServerException;
import com.yahoo.pulsar.common.policies.data.ClusterData;
import com.yahoo.pulsar.common.policies.data.NamespaceIsolationData;
import com.yahoo.pulsar.common.policies.data.Policies;
import com.yahoo.pulsar.common.policies.data.PropertyAdmin;
import com.yahoo.pulsar.common.policies.impl.NamespaceIsolationPolicies;
import com.yahoo.pulsar.common.util.ObjectMapperFactory;
import com.yahoo.pulsar.zookeeper.ZooKeeperCache;
import com.yahoo.pulsar.zookeeper.ZooKeeperChildrenCache;
import com.yahoo.pulsar.zookeeper.ZooKeeperDataCache;

/**
* ConfigurationCacheService maintains a local in-memory cache of all the configurations and policies stored in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.common.configuration;
package org.apache.pulsar.common.configuration;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.common.configuration;
package org.apache.pulsar.common.configuration;

import java.util.Properties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.yahoo.pulsar.common.configuration;
package org.apache.pulsar.common.configuration;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.yahoo.pulsar.common.util.FieldParser.update;
import static org.apache.pulsar.common.util.FieldParser.update;

import java.io.FileInputStream;
import java.io.IOException;
Expand Down
Loading

0 comments on commit 70da31b

Please sign in to comment.