[ 
https://issues.apache.org/jira/browse/STORM-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018766#comment-15018766
 ] 

ASF GitHub Bot commented on STORM-885:
--------------------------------------

Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/838#discussion_r45517334
  
    --- Diff: 
storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerServer.java ---
    @@ -0,0 +1,158 @@
    +/**
    + * 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.storm.pacemaker;
    +
    +import backtype.storm.Config;
    +import backtype.storm.generated.HBMessage;
    +import backtype.storm.messaging.netty.ISaslServer;
    +import backtype.storm.messaging.netty.NettyRenameThreadFactory;
    +import backtype.storm.security.auth.AuthUtils;
    +import java.lang.InterruptedException;
    +import java.net.InetSocketAddress;
    +import java.util.Map;
    +import java.util.concurrent.ConcurrentSkipListSet;
    +import java.util.concurrent.Executors;
    +import java.util.concurrent.ThreadFactory;
    +import javax.security.auth.login.Configuration;
    +import org.apache.storm.pacemaker.codec.ThriftNettyServerCodec;
    +import org.jboss.netty.bootstrap.ServerBootstrap;
    +import org.jboss.netty.channel.Channel;
    +import org.jboss.netty.channel.ChannelPipelineFactory;
    +import org.jboss.netty.channel.group.ChannelGroup;
    +import org.jboss.netty.channel.group.DefaultChannelGroup;
    +import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +class PacemakerServer implements ISaslServer {
    +
    +    private static final long FIVE_MB_IN_BYTES = 5 * 1024 * 1024;
    +
    +    private static final Logger LOG = 
LoggerFactory.getLogger(PacemakerServer.class);
    +
    +    private final ServerBootstrap bootstrap;
    +    private int port;
    +    private IServerMessageHandler handler;
    +    private String secret;
    +    private String topo_name;
    +    private volatile ChannelGroup allChannels = new 
DefaultChannelGroup("storm-server");
    +    private ConcurrentSkipListSet<Channel> authenticated_channels = new 
ConcurrentSkipListSet<Channel>();
    +    private ThriftNettyServerCodec.AuthMethod authMethod;
    +
    +    public PacemakerServer(IServerMessageHandler handler, Map config){
    +        int maxWorkers = (int)config.get(Config.PACEMAKER_MAX_THREADS);
    +        this.port = (int)config.get(Config.PACEMAKER_PORT);
    +        this.handler = handler;
    +        this.topo_name = "pacemaker_server";
    +
    +        String auth = (String)config.get(Config.PACEMAKER_AUTH_METHOD);
    +        if(auth.equals("DIGEST")) {
    --- End diff --
    
    switch?


> Heartbeat Server (Pacemaker)
> ----------------------------
>
>                 Key: STORM-885
>                 URL: https://issues.apache.org/jira/browse/STORM-885
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-core
>            Reporter: Robert Joseph Evans
>            Assignee: Kyle Nusbaum
>
> Large highly connected topologies and large clusters write a lot of data into 
> ZooKeeper.  The heartbeats, that make up the majority of this data, do not 
> need to be persisted to disk.  Pacemaker is intended to be a secure 
> replacement for storing the heartbeats without changing anything within the 
> heartbeats.  In the future as more metrics are added in, we may want to look 
> into switching it over to look more like Heron, where a metrics server is 
> running for each node/topology.  And can be used to aggregate/per-aggregate 
> them in a more scalable manor.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to