Search in sources :

Example 1 with PooledThreadFactory

use of com.bonree.brfs.common.utils.PooledThreadFactory in project BRFS by zhangnianli.

the class EmptyMain method start.

@Override
public void start() throws Exception {
    LOG.info("Empty Main--port[{}]", httpConfig.getPort());
    createRootDirIfNeeded(diskContext.getRootDir());
    RecordCollectionManager recorderManager = new RecordCollectionManager();
    writerManager = new FileWriterManager(recorderManager);
    writerManager.start();
    writerManager.rebuildFileWriterbyDir(diskContext.getRootDir());
    server = new NettyHttpServer(httpConfig);
    requestHandlerExecutor = Executors.newFixedThreadPool(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_REQUEST_HANDLER_NUM), new PooledThreadFactory("request_handler"));
    FileFormater fileFormater = new SimpleFileFormater(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_FILE_MAX_CAPACITY));
    NettyHttpRequestHandler requestHandler = new NettyHttpRequestHandler(requestHandlerExecutor);
    requestHandler.addMessageHandler("PUT", new OpenMessageHandler(diskContext, writerManager));
    requestHandler.addMessageHandler("POST", new WriteMessageHandler(diskContext, writerManager, fileFormater));
    requestHandler.addMessageHandler("GET", new ReadMessageHandler(diskContext, fileFormater));
    requestHandler.addMessageHandler("CLOSE", new CloseMessageHandler(diskContext, writerManager, fileFormater));
    requestHandler.addMessageHandler("DELETE", new DeleteMessageHandler(diskContext, writerManager));
    server.addContextHandler(DiskContext.URI_DISK_NODE_ROOT, requestHandler);
    NettyHttpRequestHandler flushRequestHandler = new NettyHttpRequestHandler(requestHandlerExecutor);
    flushRequestHandler.addMessageHandler("POST", new FlushMessageHandler(diskContext, writerManager));
    server.addContextHandler(DiskContext.URI_FLUSH_NODE_ROOT, flushRequestHandler);
    NettyHttpRequestHandler sequenceRequestHandler = new NettyHttpRequestHandler(requestHandlerExecutor);
    sequenceRequestHandler.addMessageHandler("GET", new FileLengthMessageHandler(diskContext, writerManager, fileFormater));
    server.addContextHandler(DiskContext.URI_LENGTH_NODE_ROOT, sequenceRequestHandler);
    NettyHttpRequestHandler listRequestHandler = new NettyHttpRequestHandler(requestHandlerExecutor);
    listRequestHandler.addMessageHandler("GET", new ListMessageHandler(diskContext));
    server.addContextHandler(DiskContext.URI_LIST_NODE_ROOT, listRequestHandler);
    NettyHttpRequestHandler recoverRequestHandler = new NettyHttpRequestHandler(requestHandlerExecutor);
    recoverRequestHandler.addMessageHandler("POST", new RecoveryMessageHandler(diskContext, serviceManager, writerManager, fileFormater));
    server.addContextHandler(DiskContext.URI_RECOVER_NODE_ROOT, recoverRequestHandler);
    NettyHttpRequestHandler pingRequestHandler = new NettyHttpRequestHandler(requestHandlerExecutor);
    pingRequestHandler.addMessageHandler("GET", new PingPongRequestHandler());
    server.addContextHandler(DiskContext.URI_PING_PONG_ROOT, pingRequestHandler);
    server.start();
}
Also used : RecordCollectionManager(com.bonree.brfs.disknode.data.write.record.RecordCollectionManager) RecoveryMessageHandler(com.bonree.brfs.disknode.server.handler.RecoveryMessageHandler) PooledThreadFactory(com.bonree.brfs.common.utils.PooledThreadFactory) PingPongRequestHandler(com.bonree.brfs.disknode.server.handler.PingPongRequestHandler) FileWriterManager(com.bonree.brfs.disknode.data.write.FileWriterManager) NettyHttpServer(com.bonree.brfs.common.net.http.netty.NettyHttpServer) FlushMessageHandler(com.bonree.brfs.disknode.server.handler.FlushMessageHandler) CloseMessageHandler(com.bonree.brfs.disknode.server.handler.CloseMessageHandler) FileLengthMessageHandler(com.bonree.brfs.disknode.server.handler.FileLengthMessageHandler) ListMessageHandler(com.bonree.brfs.disknode.server.handler.ListMessageHandler) NettyHttpRequestHandler(com.bonree.brfs.common.net.http.netty.NettyHttpRequestHandler) FileFormater(com.bonree.brfs.disknode.fileformat.FileFormater) SimpleFileFormater(com.bonree.brfs.disknode.fileformat.impl.SimpleFileFormater) ReadMessageHandler(com.bonree.brfs.disknode.server.handler.ReadMessageHandler) DeleteMessageHandler(com.bonree.brfs.disknode.server.handler.DeleteMessageHandler) WriteMessageHandler(com.bonree.brfs.disknode.server.handler.WriteMessageHandler) SimpleFileFormater(com.bonree.brfs.disknode.fileformat.impl.SimpleFileFormater) OpenMessageHandler(com.bonree.brfs.disknode.server.handler.OpenMessageHandler)

Example 2 with PooledThreadFactory

use of com.bonree.brfs.common.utils.PooledThreadFactory in project BRFS by zhangnianli.

the class DataNodeBootStrap method start.

@Override
public void start() throws Exception {
    createRootDirIfNeeded(diskContext.getRootDir());
    RecordCollectionManager recorderManager = new RecordCollectionManager();
    writerManager = new FileWriterManager(recorderManager);
    writerManager.start();
    writerManager.rebuildFileWriterbyDir(diskContext.getRootDir());
    LOG.info("####################################come here###################################");
    FileFormater fileFormater = new SimpleFileFormater(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_FILE_MAX_CAPACITY));
    threadPool = Executors.newFixedThreadPool(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_REQUEST_HANDLER_NUM), new PooledThreadFactory("message_handler"));
    MessageChannelInitializer initializer = new MessageChannelInitializer(threadPool);
    initializer.addMessageHandler(TYPE_OPEN_FILE, new OpenFileMessageHandler(diskContext, writerManager));
    initializer.addMessageHandler(TYPE_WRITE_FILE, new WriteFileMessageHandler(diskContext, writerManager, fileFormater));
    initializer.addMessageHandler(TYPE_CLOSE_FILE, new CloseFileMessageHandler(diskContext, writerManager, fileFormater));
    initializer.addMessageHandler(TYPE_DELETE_FILE, new DeleteFileMessageHandler(diskContext, writerManager));
    initializer.addMessageHandler(TYPE_PING_PONG, new PingPongMessageHandler());
    initializer.addMessageHandler(TYPE_FLUSH_FILE, new FlushFileMessageHandler(diskContext, writerManager));
    initializer.addMessageHandler(TYPE_METADATA, new MetadataFetchMessageHandler(diskContext, writerManager, fileFormater));
    initializer.addMessageHandler(TYPE_LIST_FILE, new ListFileMessageHandler(diskContext));
    initializer.addMessageHandler(TYPE_RECOVER_FILE, new FileRecoveryMessageHandler(diskContext, serviceManager, writerManager, fileFormater, readerGroup));
    ServerConfig config = new ServerConfig();
    config.setBacklog(Integer.parseInt(System.getProperty(SystemProperties.PROP_NET_BACKLOG, "2048")));
    config.setBossThreadNums(1);
    config.setWorkerThreadNums(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_SERVER_IO_NUM));
    config.setPort(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_PORT));
    config.setHost(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_HOST));
    server = new TcpServer(config, initializer);
    server.start();
    ServerConfig fileServerConfig = new ServerConfig();
    fileServerConfig.setBacklog(Integer.parseInt(System.getProperty(SystemProperties.PROP_NET_BACKLOG, "2048")));
    fileServerConfig.setBossThreadNums(1);
    fileServerConfig.setWorkerThreadNums(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_FILE_READER_NUM));
    fileServerConfig.setPort(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_FILE_PORT));
    fileServerConfig.setHost(Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_HOST));
    FileChannelInitializer fileInitializer = new FileChannelInitializer(new ReadObjectTranslator() {

        @Override
        public long offset(long offset) {
            return fileFormater.absoluteOffset(offset);
        }

        @Override
        public int length(int length) {
            return length;
        }

        @Override
        public String filePath(String path) {
            return diskContext.getConcreteFilePath(path);
        }
    });
    fileServer = new TcpServer(fileServerConfig, fileInitializer);
    fileServer.start();
}
Also used : RecordCollectionManager(com.bonree.brfs.disknode.data.write.record.RecordCollectionManager) CloseFileMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.CloseFileMessageHandler) PooledThreadFactory(com.bonree.brfs.common.utils.PooledThreadFactory) FlushFileMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.FlushFileMessageHandler) FileWriterManager(com.bonree.brfs.disknode.data.write.FileWriterManager) MessageChannelInitializer(com.bonree.brfs.common.net.tcp.MessageChannelInitializer) FileChannelInitializer(com.bonree.brfs.common.net.tcp.file.FileChannelInitializer) TcpServer(com.bonree.brfs.common.net.tcp.TcpServer) ServerConfig(com.bonree.brfs.common.net.tcp.ServerConfig) ReadObjectTranslator(com.bonree.brfs.common.net.tcp.file.ReadObjectTranslator) PingPongMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.PingPongMessageHandler) DeleteFileMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.DeleteFileMessageHandler) MetadataFetchMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.MetadataFetchMessageHandler) ListFileMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.ListFileMessageHandler) FileFormater(com.bonree.brfs.disknode.fileformat.FileFormater) SimpleFileFormater(com.bonree.brfs.disknode.fileformat.impl.SimpleFileFormater) OpenFileMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.OpenFileMessageHandler) WriteFileMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.WriteFileMessageHandler) FileRecoveryMessageHandler(com.bonree.brfs.disknode.server.tcp.handler.FileRecoveryMessageHandler) SimpleFileFormater(com.bonree.brfs.disknode.fileformat.impl.SimpleFileFormater)

Example 3 with PooledThreadFactory

use of com.bonree.brfs.common.utils.PooledThreadFactory in project BRFS by zhangnianli.

the class BootStrap method main.

public static void main(String[] args) {
    ProcessFinalizer finalizer = new ProcessFinalizer();
    try {
        // 初始化email发送配置
        EmailPool.getInstance();
        String zkAddresses = Configs.getConfiguration().GetConfig(CommonConfigs.CONFIG_ZOOKEEPER_ADDRESSES);
        String host = Configs.getConfiguration().GetConfig(RegionNodeConfigs.CONFIG_HOST);
        int port = Configs.getConfiguration().GetConfig(RegionNodeConfigs.CONFIG_PORT);
        RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
        CuratorFramework client = CuratorFrameworkFactory.newClient(zkAddresses, 3000, 15000, retryPolicy);
        client.start();
        client.blockUntilConnected();
        finalizer.add(client);
        CuratorCacheFactory.init(zkAddresses);
        String clusterName = Configs.getConfiguration().GetConfig(CommonConfigs.CONFIG_CLUSTER_NAME);
        ZookeeperPaths zookeeperPaths = ZookeeperPaths.create(clusterName, zkAddresses);
        ServerIDManager idManager = new ServerIDManager(client, zookeeperPaths);
        SimpleAuthentication simpleAuthentication = SimpleAuthentication.getAuthInstance(zookeeperPaths.getBaseUserPath(), zookeeperPaths.getBaseLocksPath(), client);
        UserModel model = simpleAuthentication.getUser("root");
        if (model == null) {
            LOG.error("please init server!!!");
            System.exit(1);
        }
        Service service = new Service(UUID.randomUUID().toString(), Configs.getConfiguration().GetConfig(CommonConfigs.CONFIG_REGION_SERVICE_GROUP_NAME), host, port);
        ServiceManager serviceManager = new DefaultServiceManager(client.usingNamespace(zookeeperPaths.getBaseClusterName().substring(1)));
        serviceManager.start();
        finalizer.add(serviceManager);
        TimeExchangeEventEmitter timeEventEmitter = new TimeExchangeEventEmitter(2);
        finalizer.add(timeEventEmitter);
        StorageRegionIdBuilder storageIdBuilder = new ZkStorageRegionIdBuilder(client.usingNamespace(zookeeperPaths.getBaseClusterName().substring(1)));
        StorageRegionManager storageNameManager = new DefaultStorageRegionManager(client.usingNamespace(zookeeperPaths.getBaseClusterName().substring(1)), storageIdBuilder);
        storageNameManager.start();
        finalizer.add(storageNameManager);
        // HttpDiskNodeConnectionPool connectionPool = new HttpDiskNodeConnectionPool(serviceManager);
        // finalizer.add(connectionPool);
        AsyncTcpClientGroup tcpClientGroup = new AsyncTcpClientGroup(Configs.getConfiguration().GetConfig(RegionNodeConfigs.CONFIG_WRITER_WORKER_NUM));
        TcpDiskNodeConnectionPool connectionPool = new TcpDiskNodeConnectionPool(serviceManager, tcpClientGroup);
        finalizer.add(tcpClientGroup);
        FilePathMaker pathMaker = new IDFilePathMaker(idManager);
        int workerThreadNum = Configs.getConfiguration().GetConfig(RegionNodeConfigs.CONFIG_SERVER_IO_THREAD_NUM);
        HttpConfig httpConfig = HttpConfig.newBuilder().setHost(host).setPort(port).setAcceptWorkerNum(1).setRequestHandleWorkerNum(workerThreadNum).setBacklog(Integer.parseInt(System.getProperty(SystemProperties.PROP_NET_BACKLOG, "2048"))).build();
        NettyHttpServer httpServer = new NettyHttpServer(httpConfig);
        httpServer.addHttpAuthenticator(new HttpAuthenticator() {

            @Override
            public int check(String userName, String passwd) {
                StringBuilder tokenBuilder = new StringBuilder();
                tokenBuilder.append(userName).append(":").append(passwd);
                return simpleAuthentication.auth(tokenBuilder.toString()) ? 0 : ReturnCode.USER_FORBID.getCode();
            }
        });
        ExecutorService requestHandlerExecutor = Executors.newFixedThreadPool(Math.max(4, Runtime.getRuntime().availableProcessors() / 4), new PooledThreadFactory("request_handler"));
        finalizer.add(new Closeable() {

            @Override
            public void close() throws IOException {
                requestHandlerExecutor.shutdown();
            }
        });
        FileObjectSyncProcessor processor = new DefaultFileObjectSyncProcessor(connectionPool, pathMaker);
        DefaultFileObjectSynchronier fileSynchronizer = new DefaultFileObjectSynchronier(processor, serviceManager, 10, TimeUnit.SECONDS);
        fileSynchronizer.start();
        finalizer.add(fileSynchronizer);
        FileNodeStorer storer = new ZkFileNodeStorer(client.usingNamespace(zookeeperPaths.getBaseClusterName().substring(1)), ZkFileCoordinatorPaths.COORDINATOR_FILESTORE);
        // 资源缓存器
        String diskGroup = Configs.getConfiguration().GetConfig(CommonConfigs.CONFIG_DATA_SERVICE_GROUP_NAME);
        String rPath = zookeeperPaths.getBaseResourcesPath() + "/" + diskGroup + "/resource";
        ClusterResource clusterResource = ClusterResource.newBuilder().setCache(true).setClient(client).setListenPath(rPath).setPool(Executors.newSingleThreadExecutor()).build().start();
        // 资源选择策略
        // 获取限制值
        double diskRemainRate = Configs.getConfiguration().GetConfig(ResourceConfigs.CONFIG_LIMIT_DISK_AVAILABLE_RATE);
        double diskForceRemainRate = Configs.getConfiguration().GetConfig(ResourceConfigs.CONFIG_LIMIT_FORCE_DISK_AVAILABLE_RATE);
        double diskwriteValue = Configs.getConfiguration().GetConfig(ResourceConfigs.CONFIG_LIMIT_DISK_WRITE_SPEED);
        double diskForcewriteValue = Configs.getConfiguration().GetConfig(ResourceConfigs.CONFIG_LIMIT_FORCE_DISK_WRITE_SPEED);
        long diskRemainSize = Configs.getConfiguration().GetConfig(ResourceConfigs.CONFIG_LIMIT_DISK_REMAIN_SIZE);
        long diskForceRemainSize = Configs.getConfiguration().GetConfig(ResourceConfigs.CONFIG_LIMIT_FORCE_DISK_REMAIN_SIZE);
        LimitServerResource lmit = new LimitServerResource();
        lmit.setDiskRemainRate(diskRemainRate);
        lmit.setDiskWriteValue(diskwriteValue);
        lmit.setForceDiskRemainRate(diskForceRemainRate);
        lmit.setForceWriteValue(diskForcewriteValue);
        lmit.setRemainWarnSize(diskRemainSize);
        lmit.setRemainForceSize(diskForceRemainSize);
        int centSize = Configs.getConfiguration().GetConfig(ResourceConfigs.CONFIG_RESOURCE_CENT_SIZE);
        long fileSize = Configs.getConfiguration().GetConfig(DataNodeConfigs.CONFIG_FILE_MAX_CAPACITY) / 1024;
        MachineResourceWriterSelector serviceSelector = new MachineResourceWriterSelector(connectionPool, storer, lmit, diskGroup, fileSize, centSize);
        // 生成备用选择器
        DuplicateNodeSelector bakSelect = new MinimalDuplicateNodeSelector(serviceManager, connectionPool);
        // 选择
        DuplicateNodeSelector nodeSelector = ResourceWriteSelector.newBuilder().setBakSelector(bakSelect).setDaemon(clusterResource).setGroupName(diskGroup).setStorageRegionManager(storageNameManager).setResourceSelector(serviceSelector).build();
        FileObjectFactory fileFactory = new DefaultFileObjectFactory(service, storer, nodeSelector, idManager, connectionPool);
        int closerThreadNum = Configs.getConfiguration().GetConfig(RegionNodeConfigs.CONFIG_CLOSER_THREAD_NUM);
        DefaultFileObjectCloser fileCloser = new DefaultFileObjectCloser(closerThreadNum, fileSynchronizer, storer, connectionPool, pathMaker);
        finalizer.add(fileCloser);
        FileNodeSinkManager sinkManager = new ZkFileNodeSinkManager(client.usingNamespace(zookeeperPaths.getBaseClusterName().substring(1)), service, serviceManager, timeEventEmitter, storer, new RandomFileNodeSinkSelector(), fileCloser);
        sinkManager.start();
        finalizer.add(sinkManager);
        DataPoolFactory dataPoolFactory = new BlockingQueueDataPoolFactory(Configs.getConfiguration().GetConfig(RegionNodeConfigs.CONFIG_DATA_POOL_CAPACITY));
        FileObjectSupplierFactory fileSupplierFactory = new DefaultFileObjectSupplierFactory(fileFactory, fileCloser, fileSynchronizer, sinkManager, timeEventEmitter);
        DiskWriter diskWriter = new DiskWriter(Configs.getConfiguration().GetConfig(RegionNodeConfigs.CONFIG_WRITER_WORKER_NUM), connectionPool, pathMaker);
        finalizer.add(diskWriter);
        DataEngineFactory engineFactory = new DefaultDataEngineFactory(dataPoolFactory, fileSupplierFactory, diskWriter);
        DefaultDataEngineManager engineManager = new DefaultDataEngineManager(storageNameManager, engineFactory);
        finalizer.add(engineManager);
        DefaultStorageRegionWriter writer = new DefaultStorageRegionWriter(engineManager);
        NettyHttpRequestHandler requestHandler = new NettyHttpRequestHandler(requestHandlerExecutor);
        requestHandler.addMessageHandler("POST", new WriteDataMessageHandler(writer));
        requestHandler.addMessageHandler("GET", new ReadDataMessageHandler());
        requestHandler.addMessageHandler("DELETE", new DeleteDataMessageHandler(zookeeperPaths, serviceManager, storageNameManager));
        httpServer.addContextHandler(URI_DATA_ROOT, requestHandler);
        NettyHttpRequestHandler snRequestHandler = new NettyHttpRequestHandler(requestHandlerExecutor);
        snRequestHandler.addMessageHandler("PUT", new CreateStorageRegionMessageHandler(storageNameManager));
        snRequestHandler.addMessageHandler("POST", new UpdateStorageRegionMessageHandler(storageNameManager));
        snRequestHandler.addMessageHandler("GET", new OpenStorageRegionMessageHandler(storageNameManager));
        snRequestHandler.addMessageHandler("DELETE", new DeleteStorageRegionMessageHandler(zookeeperPaths, storageNameManager, serviceManager));
        httpServer.addContextHandler(URI_STORAGE_REGION_ROOT, snRequestHandler);
        httpServer.start();
        finalizer.add(httpServer);
        serviceManager.registerService(service);
        finalizer.add(new Closeable() {

            @Override
            public void close() throws IOException {
                try {
                    serviceManager.unregisterService(service);
                } catch (Exception e) {
                    LOG.error("unregister service[{}] error", service, e);
                }
            }
        });
    } catch (Exception e) {
        LOG.error("launch server error!!!", e);
        System.exit(1);
    } finally {
        Runtime.getRuntime().addShutdownHook(finalizer);
    }
}
Also used : OpenStorageRegionMessageHandler(com.bonree.brfs.duplication.storageregion.handler.OpenStorageRegionMessageHandler) Closeable(java.io.Closeable) BlockingQueueDataPoolFactory(com.bonree.brfs.duplication.datastream.dataengine.impl.BlockingQueueDataPoolFactory) FileObjectSupplierFactory(com.bonree.brfs.duplication.datastream.file.FileObjectSupplierFactory) DefaultFileObjectSupplierFactory(com.bonree.brfs.duplication.datastream.file.DefaultFileObjectSupplierFactory) HttpAuthenticator(com.bonree.brfs.common.net.http.netty.HttpAuthenticator) TimeExchangeEventEmitter(com.bonree.brfs.common.timer.TimeExchangeEventEmitter) DefaultDataEngineFactory(com.bonree.brfs.duplication.datastream.dataengine.impl.DefaultDataEngineFactory) ZkFileNodeStorer(com.bonree.brfs.duplication.filenode.zk.ZkFileNodeStorer) FileNodeStorer(com.bonree.brfs.duplication.filenode.FileNodeStorer) ZkStorageRegionIdBuilder(com.bonree.brfs.duplication.storageregion.impl.ZkStorageRegionIdBuilder) CuratorFramework(org.apache.curator.framework.CuratorFramework) DefaultFileObjectSynchronier(com.bonree.brfs.duplication.datastream.file.sync.DefaultFileObjectSynchronier) DefaultFileObjectCloser(com.bonree.brfs.duplication.datastream.file.DefaultFileObjectCloser) DefaultFileObjectFactory(com.bonree.brfs.duplication.datastream.file.DefaultFileObjectFactory) FileObjectFactory(com.bonree.brfs.duplication.datastream.file.FileObjectFactory) HttpConfig(com.bonree.brfs.common.net.http.HttpConfig) ProcessFinalizer(com.bonree.brfs.common.process.ProcessFinalizer) WriteDataMessageHandler(com.bonree.brfs.duplication.datastream.handler.WriteDataMessageHandler) IDFilePathMaker(com.bonree.brfs.duplication.datastream.IDFilePathMaker) ZkFileNodeSinkManager(com.bonree.brfs.duplication.filenode.zk.ZkFileNodeSinkManager) TcpDiskNodeConnectionPool(com.bonree.brfs.duplication.datastream.connection.tcp.TcpDiskNodeConnectionPool) ServerIDManager(com.bonree.brfs.server.identification.ServerIDManager) DefaultStorageRegionWriter(com.bonree.brfs.duplication.datastream.writer.DefaultStorageRegionWriter) DefaultFileObjectSupplierFactory(com.bonree.brfs.duplication.datastream.file.DefaultFileObjectSupplierFactory) DefaultFileObjectSyncProcessor(com.bonree.brfs.duplication.datastream.file.sync.DefaultFileObjectSyncProcessor) SimpleAuthentication(com.bonree.brfs.authentication.SimpleAuthentication) BlockingQueueDataPoolFactory(com.bonree.brfs.duplication.datastream.dataengine.impl.BlockingQueueDataPoolFactory) DataPoolFactory(com.bonree.brfs.duplication.datastream.dataengine.impl.DataPoolFactory) DataEngineFactory(com.bonree.brfs.duplication.datastream.dataengine.DataEngineFactory) DefaultDataEngineFactory(com.bonree.brfs.duplication.datastream.dataengine.impl.DefaultDataEngineFactory) ZkFileNodeStorer(com.bonree.brfs.duplication.filenode.zk.ZkFileNodeStorer) StorageRegionManager(com.bonree.brfs.duplication.storageregion.StorageRegionManager) DefaultStorageRegionManager(com.bonree.brfs.duplication.storageregion.impl.DefaultStorageRegionManager) DefaultFileObjectSyncProcessor(com.bonree.brfs.duplication.datastream.file.sync.DefaultFileObjectSyncProcessor) FileObjectSyncProcessor(com.bonree.brfs.duplication.datastream.file.sync.FileObjectSyncProcessor) ZkFileNodeSinkManager(com.bonree.brfs.duplication.filenode.zk.ZkFileNodeSinkManager) FileNodeSinkManager(com.bonree.brfs.duplication.filenode.FileNodeSinkManager) ExponentialBackoffRetry(org.apache.curator.retry.ExponentialBackoffRetry) AsyncTcpClientGroup(com.bonree.brfs.common.net.tcp.client.AsyncTcpClientGroup) DefaultFileObjectFactory(com.bonree.brfs.duplication.datastream.file.DefaultFileObjectFactory) ClusterResource(com.bonree.brfs.duplication.filenode.duplicates.ClusterResource) RandomFileNodeSinkSelector(com.bonree.brfs.duplication.filenode.zk.RandomFileNodeSinkSelector) UserModel(com.bonree.brfs.authentication.model.UserModel) ServiceManager(com.bonree.brfs.common.service.ServiceManager) DefaultServiceManager(com.bonree.brfs.common.service.impl.DefaultServiceManager) NettyHttpRequestHandler(com.bonree.brfs.common.net.http.netty.NettyHttpRequestHandler) DefaultStorageRegionManager(com.bonree.brfs.duplication.storageregion.impl.DefaultStorageRegionManager) PooledThreadFactory(com.bonree.brfs.common.utils.PooledThreadFactory) CreateStorageRegionMessageHandler(com.bonree.brfs.duplication.storageregion.handler.CreateStorageRegionMessageHandler) ExecutorService(java.util.concurrent.ExecutorService) Service(com.bonree.brfs.common.service.Service) NettyHttpServer(com.bonree.brfs.common.net.http.netty.NettyHttpServer) IOException(java.io.IOException) IDFilePathMaker(com.bonree.brfs.duplication.datastream.IDFilePathMaker) FilePathMaker(com.bonree.brfs.duplication.datastream.FilePathMaker) ReadDataMessageHandler(com.bonree.brfs.duplication.datastream.handler.ReadDataMessageHandler) DefaultDataEngineManager(com.bonree.brfs.duplication.datastream.dataengine.impl.DefaultDataEngineManager) DeleteStorageRegionMessageHandler(com.bonree.brfs.duplication.storageregion.handler.DeleteStorageRegionMessageHandler) IOException(java.io.IOException) DefaultServiceManager(com.bonree.brfs.common.service.impl.DefaultServiceManager) DiskWriter(com.bonree.brfs.duplication.datastream.writer.DiskWriter) ZookeeperPaths(com.bonree.brfs.common.ZookeeperPaths) DeleteDataMessageHandler(com.bonree.brfs.duplication.datastream.handler.DeleteDataMessageHandler) ExecutorService(java.util.concurrent.ExecutorService) LimitServerResource(com.bonree.brfs.resourceschedule.model.LimitServerResource) RetryPolicy(org.apache.curator.RetryPolicy) StorageRegionIdBuilder(com.bonree.brfs.duplication.storageregion.StorageRegionIdBuilder) ZkStorageRegionIdBuilder(com.bonree.brfs.duplication.storageregion.impl.ZkStorageRegionIdBuilder) DuplicateNodeSelector(com.bonree.brfs.duplication.filenode.duplicates.DuplicateNodeSelector) UpdateStorageRegionMessageHandler(com.bonree.brfs.duplication.storageregion.handler.UpdateStorageRegionMessageHandler)

Aggregations

PooledThreadFactory (com.bonree.brfs.common.utils.PooledThreadFactory)3 NettyHttpRequestHandler (com.bonree.brfs.common.net.http.netty.NettyHttpRequestHandler)2 NettyHttpServer (com.bonree.brfs.common.net.http.netty.NettyHttpServer)2 FileWriterManager (com.bonree.brfs.disknode.data.write.FileWriterManager)2 RecordCollectionManager (com.bonree.brfs.disknode.data.write.record.RecordCollectionManager)2 FileFormater (com.bonree.brfs.disknode.fileformat.FileFormater)2 SimpleFileFormater (com.bonree.brfs.disknode.fileformat.impl.SimpleFileFormater)2 SimpleAuthentication (com.bonree.brfs.authentication.SimpleAuthentication)1 UserModel (com.bonree.brfs.authentication.model.UserModel)1 ZookeeperPaths (com.bonree.brfs.common.ZookeeperPaths)1 HttpConfig (com.bonree.brfs.common.net.http.HttpConfig)1 HttpAuthenticator (com.bonree.brfs.common.net.http.netty.HttpAuthenticator)1 MessageChannelInitializer (com.bonree.brfs.common.net.tcp.MessageChannelInitializer)1 ServerConfig (com.bonree.brfs.common.net.tcp.ServerConfig)1 TcpServer (com.bonree.brfs.common.net.tcp.TcpServer)1 AsyncTcpClientGroup (com.bonree.brfs.common.net.tcp.client.AsyncTcpClientGroup)1 FileChannelInitializer (com.bonree.brfs.common.net.tcp.file.FileChannelInitializer)1 ReadObjectTranslator (com.bonree.brfs.common.net.tcp.file.ReadObjectTranslator)1 ProcessFinalizer (com.bonree.brfs.common.process.ProcessFinalizer)1 Service (com.bonree.brfs.common.service.Service)1