text:
package io.spikex.filter.output;

import static io.spikex.core.helper.Events.EVENT_FIELD_BATCH_EVENTS;
import static io.spikex.core.helper.Events.EVENT_FIELD_BATCH_SIZE;
import static io.spikex.core.helper.Events.EVENT_FIELD_ID;
import io.spikex.core.helper.Variables;
import io.spikex.core.util.Version;
import io.spikex.core.util.connection.AsbtractHttpClient;
import io.spikex.core.util.connection.ConnectionException;
import io.spikex.core.util.connection.DefaultConnectionExceptionHandler;
import io.spikex.core.util.connection.HttpClientAdapter;
import io.spikex.core.util.connection.HttpClientResponseAdapter;
import io.spikex.core.util.connection.IConnection;
import io.spikex.core.util.resource.ResourceException;
import io.spikex.core.util.resource.TextResource;
import java.net.URI;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.vertx.java.core.buffer.Buffer;
import org.vertx.java.core.http.HttpClient;
import org.vertx.java.core.http.HttpClientRequest;
import org.vertx.java.core.http.HttpClientResponse;
import static org.vertx.java.core.http.HttpHeaders.CONTENT_LENGTH;
import org.vertx.java.core.json.JsonArray;
import org.vertx.java.core.json.JsonObject;

/**
 *

 * This filter has been tested on Linux, Windows, FreeBSD and OS X.
 *

 * Alias: MutateField

 * Name: io.spikex.filter.MutateField

 *

 * Built-in variables:
 *

 *

 *
#nodeid : the node identifier

 *
#node : the node name

 *
#clusterid : the cluster identifier

 *
#cluster : the cluster name

 *
#host : host name as returned by operating system

 *
#hostip : the first host ip address as returned by operating system

 *
#date : ISO8601 date

 *
#timestamp : ISO8601 high-precision timestamp

 *
#env.<environment variable name> : environment variable value

 *
#sensor.<sensor name> : sensor value

 *

 *

 * Example:
 *

 *  "output": {
 *          "Elasticsearch": {
 *                      "nodes": [ "localhost:9200", "remote:9200" ],
 *                      "transport": "http",
 *                      "bulk-size": 10,
 *                      "index": "logstash-%{#segment}-%{+YYYY.MM.dd}",
 *                      "retention-days": 90,
 *                      "template": "file:///home/yuzu/logstash-template.json",
 *                      "template-name": "logstash",
 *                      "template-update": true,
 *                      "match-tags": "*"
 *                      }
 *          }
 *

 *

 * References:

 * http://www.elasticsearch.org/blog/using-elasticsearch-and-logstash-to-serve-billions-of-searchable-events-for-customers/
 * http://www.elasticsearch.org/blog/new-in-logstash-1-3-elasticsearch-index-template-management/
 * https://gist.github.com/jordansissel/2996677
 * http://untergeek.com/2012/09/20/using-templates-to-improve-elasticsearch-caching-with-logstash/
 *
 * @author cli
 */
public final class Elasticsearch extends AsbtractHttpClient {

    private String m_indexType;
    private String m_indexSelector;

    private static final String CONF_KEY_INDEX_SELECTOR = "index-selector";
    private static final String CONF_KEY_INDEX_TYPE = "index-type";
    private static final String CONF_KEY_TEMPLATE_DIR = "template-dir";
    private static final String CONF_KEY_TEMPLATE_NAME = "template-name";
    private static final String CONF_KEY_TEMPLATE_SUFFIX = "template-suffix";
    private static final String CONF_KEY_TEMPLATE_UPDATE = "template-update";

    //
    // Configuration defaults
    //
    private static final String DEF_INDEX_SELECTOR = "logstash-%{#+YYYY.MM.dd}";
    private static final String DEF_INDEX_TYPE = "%{@type}";
    private static final String DEF_TEMPLATE_DIR = "mapping";
    private static final String DEF_TEMPLATE_NAME = "logstash-template";
    private static final String DEF_TEMPLATE_SUFFIX = ".json";
    private static final boolean DEF_TEMPLATE_UPDATE = false;

    //
    // Elasticsearch URIs
    //
    private static final String ES_STATUS_URI = "/_cluster/state/version";
    private static final String ES_PUBLISH_URI = "/_bulk";
    private static final String ES_TEMPLATE_URI = "/_template";

    @Override
    protected void startClient() {

        m_indexType = config().getString(CONF_KEY_INDEX_TYPE, DEF_INDEX_TYPE);
        m_indexSelector = config().getString(CONF_KEY_INDEX_SELECTOR, DEF_INDEX_SELECTOR);

        //
        // Create/update template
        //
        if (config().getBoolean(CONF_KEY_TEMPLATE_UPDATE, DEF_TEMPLATE_UPDATE)) {

            // Template directory
            Path templatePath = confPath().resolve(DEF_TEMPLATE_DIR);
            String dir = config().getString(CONF_KEY_TEMPLATE_DIR, templatePath.toString());
            URI base = Paths.get(dir).toAbsolutePath().toUri();

            String name = config().getString(CONF_KEY_TEMPLATE_NAME, DEF_TEMPLATE_NAME);
            String suffix = config().getString(CONF_KEY_TEMPLATE_SUFFIX, DEF_TEMPLATE_SUFFIX);

            try {
                // Load resource
                TextResource resource = TextResource.builder(base)
                        .name(name)
                        .suffix(suffix)
                        .version(Version.latest(name))
                        .build()
                        .load();

                // Create or update template in Elasticsearch
                IConnection<HttpClient> connection = connections().next();
                EsTemplateCreator handler = new EsTemplateCreator(connection, name, resource);
                connection.doRequest(handler);

            } catch (ResourceException | ConnectionException e) {
                throw new IllegalStateException("Failed to load or update index template: "
                        + name + suffix, e);
            }
        }
    }

    @Override
    protected void handleEvent(final JsonObject batchEvent) {
        try {
            if (isStarted()) {

                int available = connections().getAvailableCount();
                logger().trace("Received event: {} batch-size: {} available servers: {}",
                        batchEvent.getString(EVENT_FIELD_ID),
                        batchEvent.getInteger(EVENT_FIELD_BATCH_SIZE, 0),
                        available);

                if (available > 0) {

                    //
                    // Find next available Elasticsearch host
                    //
                    IConnection<HttpClient> connection = connections().next();
                    EsBulkPublisher handler = new EsBulkPublisher(
                            connection,
                            m_indexType,
                            m_indexSelector,
                            batchEvent,
                            variables());

                    connection.doRequest(handler);
                }
            }
        } catch (ConnectionException e) {
            logger().error("Failed to publish event: {}",
                    batchEvent.getString(EVENT_FIELD_ID), e);
        }
    }

    private static class EsTemplateCreator extends HttpClientAdapter {

        private final String m_templateName;
        private final TextResource m_templateResource;
        private final Logger m_logger = LoggerFactory.getLogger(EsTemplateCreator.class);

        private EsTemplateCreator(
                final IConnection<HttpClient> connection,
                final String templateName,
                final TextResource templateResource) {

            super(connection);
            m_templateName = templateName;
            m_templateResource = templateResource;
        }

        @Override
        protected void doRequest(final HttpClient client) {

            String uri = ES_TEMPLATE_URI + "/" + m_templateName;
            HttpClientRequest request = doPut(uri, new HttpClientResponseAdapter() {

                @Override
                protected void handleSuccess(final HttpClientResponse response) {
                    if (response.statusCode() == 200) {
                        m_logger.debug("Successfully updated template: {} (host: {})",
                                m_templateName, getConnection().getAddress());
                    }
                }

                @Override
                protected void handleFailure(final HttpClientResponse response) {
                    if (response.statusCode() != 200) {
                        m_logger.error("Failed to create or update template: {} (host: {})",
                                m_templateName,
                                getConnection().getAddress(),
                                new IllegalStateException("HTTP post failure: "
                                        + response.statusCode()
                                        + "/"
                                        + response.statusMessage()));
                    }
                }
            });

            String content = m_templateResource.getData();
            byte[] body = content.getBytes();
            request.putHeader(CONTENT_LENGTH, String.valueOf(body.length));
            request.exceptionHandler(new DefaultConnectionExceptionHandler(
                    getConnection()));
            request.write(new Buffer(body));
            request.end();
        }
    }

    private static class EsBulkPublisher extends HttpClientAdapter {

        private final String m_indexType;
        private final String m_indexSelector;
        private final JsonObject m_batchEvent;
        private final Variables m_variables;
        private final Logger m_logger = LoggerFactory.getLogger(EsBulkPublisher.class);

        private EsBulkPublisher(
                final IConnection<HttpClient> connection,
                final String indexType,
                final String indexSelector,
                final JsonObject batchEvent,
                final Variables variables) {

            super(connection);
            m_indexType = indexType;
            m_indexSelector = indexSelector;
            m_batchEvent = batchEvent;
            m_variables = variables;
        }

        @Override
        protected void doRequest(final HttpClient client) {

            String uri = ES_PUBLISH_URI;
            HttpClientRequest request = doPost(uri, new HttpClientResponseAdapter() {

                @Override
                protected void handleFailure(final HttpClientResponse response) {
                    if (response.statusCode() != 200) {
                        m_logger.error("Failed to index events: {} (host: {} index: {})",
                                m_batchEvent.getString(EVENT_FIELD_ID),
                                getConnection().getAddress(),
                                m_indexSelector,
                                new IllegalStateException("HTTP post failure: "
                                        + response.statusCode()
                                        + "/"
                                        + response.statusMessage()));
                    }
                }
            });

            //
            // Operate on arrays only (batches)
            //
            JsonArray batch = m_batchEvent.getArray(EVENT_FIELD_BATCH_EVENTS, new JsonArray());
            if (!m_batchEvent.containsField(EVENT_FIELD_BATCH_EVENTS)) {
                batch.addObject(m_batchEvent);
            }

            //
            // Build bulk of json data to post
            // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
            //
            StringBuilder bulk = new StringBuilder();
            for (int i = 0; i < batch.size(); i++) {
                //
                // Translate index name and type from event contents (if needed)
                //
                JsonObject event = batch.get(i);
                String index = String.valueOf(m_variables.translate(event, m_indexSelector));
                String type = String.valueOf(m_variables.translate(event, m_indexType));

                // Action and meta data
                bulk.append("{\"index\":{\"_index\":\"");
                bulk.append(index);
                bulk.append("\",\"_type\":\"");
                bulk.append(type);
                bulk.append("\",\"_id\":\"");
                bulk.append(event.getString(EVENT_FIELD_ID));
                bulk.append("\"}}\n");
                // Index data
                bulk.append(event.toString());
                bulk.append("\n");
            }

            byte[] body = bulk.toString().getBytes();
            request.putHeader(CONTENT_LENGTH, String.valueOf(body.length));
            request.exceptionHandler(new DefaultConnectionExceptionHandler(
                    getConnection()));
            request.write(new Buffer(body));
            request.end();
        }
    }
}


Toronto Blue Jays shortstop Munenori Kawasaki has been filling in for Jose Reyes after he suffered a left ankle sprain. Although Kawasaki hasn't been a huge help on offense, teammates and fans love the style he brings to the game. This weekend, everyone other baseball fan was able to see why the city of Toronto loves him.
Toronto was down 5-4 and Kawasaki made it to the plate with two outs and two men on base. He hit a pitch to the outfield that went for a double to win the game. After his walk-off double he gave an amazing post-game interview after being brought back to the field by Mark DeRosa, who scored the winning run.
Kawasaki proceded to answer a "What do you have to say for yourself?" question with this gem: "Thank you very much! My name is Munenori Kawasaki! I am from Japan. I'm Japanese!" He then looked in a phrase book and added ,"My teammates gave me an opportunity so I wanted to do something about it."
And then he got a pie in the face. And some Gatorade.
This has to be the best interview after a win ever. We just need a "you have no marbles" comment and this would be the best video ever. Check it out below.


They know exactly what to say and when to say it.
Their fans lap it up and play the victim card.
The media lap it up and back cellics pro-active approach whilst questioning why nothing has been done to the bad songs that get sung at them.
As I said in another post S, they are scum but their PR is outstanding, of course helped by their friends in the media.
Sickening that we have no intention of competing with them in the PR war.
This is the sort of thing that our board should be highlighting.
Sometimes I wonder if celtic learn their PR propaganda from Sinn Fein, or if it's the other way round.
embarrassing statement from the bheasts .
we get bears saying why doesnt our board act the same way .
well in the last 24hrs we have also come out with a statement on a totally separate topic .no shame attached to our statement just a bit of self promotion .
look at the way both statements have been recieved in the media and which one ridiculed .
McInnes revealed the singing would be included in the match delegate's report and expressed interest in seeing if the Parkhead club were also disciplined for the conduct of their followers at the cup tie.
But Clare Whyte, the SFA compliance officer, appears unlikely to take any action because celtic are able to demonstrate they took all "reasonably practicable steps" to prevent any disorder in the stands.
It has emerged the Scottish champions held talks with ǝpɐbıɹq uǝǝɹb ǝɥʇ in the days leading up to the semi-final to discuss their conduct and use of pyrotechnics at games following a series of flashpoints in high-profile matches.
Smoke canisters and flares have been set off at celtic games on several occasions this season. There was also a pitch invasion by occupants of the safe-standing section at Parkhead at the Old Firm game last month that resulted in the electronic advertising boards down one side of the pitch being knocked over and a steward suffering an injury.
The meeting with the ultras group - along with other preventative measures - has highlighted to the governing body that the double treble winners take the conduct of their fans seriously and are committed to ensuring a safe and family-friendly environment for spectators.
celtic released a statement on Monday evening denouncing the sectarian songs that were aired in the semi-final the day before - but also highlighting the behaviour of Aberdeen supporters during the same match.
celtic chief executive Peter Lawwell issued a statement after St Mirren keeper Vaclav Hlkady required treatment after a firework landed near him during a game against celtic in Paisley earlier this month.
He said: "There have a been a number of incidents across many clubs this season, with a range of items, including pyrotechnics, being thrown on to pitches. We need to do all we can to remove this from our game. The club does not want it, our players do not want it, our manager does not want it and our supporters do not want it."
Brother walfrid long fogotten by that shower .
Did walfrid have a gambling problem?
What a legacy Walfrid left eh?
I think"Helping" kids was his only vice mate.
Walfrid was a sectarian bigot.


What can be classified as a nightmare for millennials? We think 90 percent of the time its the no internet scare. And most service providers take advantage of this handicapped nature of us relying on the internet and charge us an extremely high price for this service. But now we have a hack for this. Its free WiFi, and we don't mean just the ones that you steal from your neighbors.
But while we talk about free WiFi you have to keep in mind the security goof us that can happen when you use an open free WiFi. Also, another big point to keep in mind is that if its free its not going to be that fast and is going to have quite a few glitches. But nevertheless, let's look into a few free Wifi options that will help us with the millennials worst nightmare.
Who doesn't know Starbucks, the place where you will get free WiFi with a piping mug of whatever beverage you want. And you're free to picture that cold weather outside and make the perfect scene in your head.
But Starbucks isn't the only place with free WiFi. Quite a few of the other famous lines provide you with free WiFi, such as Apple Stores, Barnes and Noble, McDonald's, Panera Bread, DunkinDonuts, Buffalo Wild Wings, Whole Foods, Staples, Best Buy, Target, Subway, Taco Bell and Michaels among other places. A few hotel lines even provide you with free WiFI if you join their loyalty programs such as Omni hotels and Kimpton hotel.
Now we did give you a list of famous lines where you will definitely find free WiFi, But there are tons of other places that just wont cross your minds such as laundromats, or museums etc. If you are eager to know such places you have applications and databases for the same. The first one is a global database, WiFi Free Spot has a compiled list of the free hotspot places in the whole of US, Australia, Canada, Africa, Middle East, South and Central America, Asia, and even Europe. To make life easy for you these are well differentiated and stacked according to country state and city and they include places like hotels libraries and even mode of transports.
The next hotspot finder option makes your life even easier. It's the WiFi Map. This is basically google maps that tell you how far or close the free WiFis are from your current location. This app, available on iOS and Android provides you with user-provided passwords too that will let you access password protected WiFi. This is your best list of WiFis on the go.
Another application is also available on both iOS and Android is the application that gives you the strongest WiFi network in the vicinity and connects you to it.
Many phone providers such as Xfinity, Verizon Optimum etc provide free WiFi hotspots specifically in well-populated cities in densely populated areas. You will have to use your ZipCode to find these hotspots with these companies Some US cell phone providers also offer hotspots.
AT&Tcustomers can take advantage of a similar free service, which T-Mobile customers will have to pay an additional $9.99 per month for access to hotspots.
Another option in the ISP, though we strictly advise you to use it as your last resort due to its terribly slow speed are the All free ISP. This is another searchable database which has free Wifi service providers in your vicinity. But be warned the speed of this is going to be slower than a tortoise walking. Any injuries to person or property due to being annoyed by the speed won't be either our or the service providers responsibility. So you better have it all handles and ready for the speed.
There you go. You have the most helpful hacks ever. But while using we would like to emphasize your security of information. Be extra careful and wise while using open free networks.
Next articleGoogle Pixel Slate Review: Who are you aiming at Google?


Know Mcgehee HS Class of 2002 graduates that are NOT on this List? Help us Update the 2002 Class List by adding missing names.
More 2002 alumni from Mcgehee HS have posted profiles on Classmates.com®. Click here to register for free at Classmates.com® and view other 2002 alumni.
The students that went to school at the Mcgehee high school called Mcgehee High School and graduated in '02 are on this page. Register to add your name to the class of 2002 graduates list.


text:
After shocking loss, men's basketball team looks ahead
by Beau Worley
Members of the mens basketball team thanks fans as they return to Chapel hill Tuesday. The team finished the season with a 33-7 record, losing to Villanova in the championship game. (Photo by John Thomas/Carolina Connection)
It's been almost a week since the Tar Heels were beat by the Villanova Wildcats in the NCAA Basketball Tournament, and most of campus is still reeling from the loss. Down by ten points late in the game, the Heels did claw their way back into striking distance thanks to a herculean effort by Marcus Paige.
It was a game a a season like no other, as John Thomas reports.

redpajama_set_name: RedPajamaCommonCrawl


text:
About Wikivoyage
1.1 By train
8.1 Budget
8.2 Mid-range
8.3 Splurge
9 Go next
town in the canton of Vaud, Switzerland, on Lake Neuchâtel
Europe > Central Europe > Switzerland > Western Switzerland > Vaud > Yverdon
Yverdon-les-Bains with its 24,000 inhabitants, is the second largest town in the Canton de Vaud. Situated at the southern shore of the Lac de Neuchâtel, it is the southern gate to the Pays des Trois-Lacs (Three Lakes Region) [1], host of the 2002 National Exhibition (Expo.02) in Switzerland.
Mainly known for its thermal baths, this town has also a rich history and art life. It offers a prehistoric site of standing stones (dolmen) that is more than 6'000 years old, ruins of the Roman town, a castle of the 13th century, as well as a church and a city hall of the 18th century. The arts are well represented with the theatre Benno Besson, the Museum of Yverdon, the Swiss fashion museum, and the science fiction museum La Maison d'Ailleurs.
Get inEdit
By trainEdit
Yverdon-les-Bains is served by one of the most efficient passenger rail services in the world, the Swiss Federal Rail. Trains run roughly each hour between 05:20 and 00:06 every day to and from Geneva, Zurich, Berne, Lausanne, Neuchatel, Biel, Fribourg and points in between.
Get aroundEdit
By busEdit
The transport company TRAVYS [2] (Transport Vallée de Joux - Yverdon-les-Bains - Sainte-Croix) allows you to travel in and around Yverdon-les-Bains. Buses run roughly each 20 minutes between 6AM and 8PM every day.
SeeEdit
Yverdon-les-Bains Region Tourist Office [3], Avenue de la Gare 2 (Walk outside the main train station and turn to your left. Walk 200 meters and you will see the familiar 'i' marking a tourist office in Switzerland.), ☏ +41 24 423 61 01, fax: +41 24 426 11 22, ✉ info@yverdon-les-bains.ch.
DoEdit
Museum of Yverdon-les-Bains and Region (in the castle). Exhibits about the 6'000 years of the local history, and Egyptians antiques displayed in the castle.
Centre Pestalozzi. Johann Heinrich Pestalozzi (1746-1827) has lived during 20 years in the Castle, where he managed his educational institution from 1805 until 1825.
Swiss fashion museum (Musée suisse de la Mode). 3000 items of clothing and accessories. A unique and precious collection exclusively made of donations.
46.77866.6421 Maison d'Ailleurs. The Maison d'Ailleurs is devoted to science fiction and to superhero comics – and as such is the only of its kind in Europe. Its collection of more than 60'000 items is opened to scholars and researchers. Each year, 2-3 special exhibitions are organized on a great variety of topics related to science fiction, utopia and extraordinary journeys, such as flying cars, James Gurney's Dinotopia, xenobiology, science fiction as a source of inspiration for ESA's engineers, etc.
The area around the beaches is somewhat industrial, but there are a few cool spots along the shore of the lake. Walk along the canals, watch the birds, and see the (partially rebuilt) menhirs of Clendy. These are situated in the forest, close to the roundabout at the exit of Yverdon towards Estavayer. The most convenient parking lot is the one at the main beach.
There is a nature reserve at Champ-Pittet with a forest path and a footbridge through the swamps which leads to a watchtower. The fauna and flora here is typical of the southern shore of Lake Neuchatel. There's even a train station of the Yverdon-Fribourg line near the entrance: get off at Yverdon-Champ-Pittet.
BuyEdit
EatEdit
46.779366.638551 Don Camillo, Rue du Pré 10. Great Italian restaurant in the middle of downtown. Good food, good prices
46.78116.66792 La Table de Mary, Route du Gymnase, 2, ☏ +41 24 436 31 10.
46.7784036.640323 La Grenette. The place for haute cuisine in Yverdon. Inventive mains and worthy desserts. Outdoor seating on a nice street.
46.77776.642354 La Brass'ry, 8 Rue de la Plaine. A good place to grab a sandwich with a drink for a quick lunch while wandering around the historical center. Located right next to the castle.
46.7800516.6378435 Double R, Rue du Collège 4, ☏ +41 79 464 77 95. (updated Mar 2019)
DrinkEdit
L'intemporel Café, ☏ +41 24 425 50 90. Coffee, bord games, and a fine selection of teas and Swiss and imported beers in a slightly under-decorated but comfortable and welcoming atmosphere.
SleepEdit
BudgetEdit
Gite du Passant (Youth Hostel), Rue du Parc 14, ☏ +41 24 425 12 33, fax: +41 24 426 00 96.
Camping des Iris, ☏ +41 24 425 10 89, fax: +41 24 425 76 31.
Campings VD8, Le Pécos, Les Cluds.
Mid-rangeEdit
[formerly dead link] Expo Hôtel, En Chamard, 1442 Montagny-pres-Yverdon.
[dead link] Hôtel de la Maison Blanche, En Calamin, 1405 Pomy.
Bed and Breakfast - La Sablonnaire, Rue de la Sablonnaire 1.
SplurgeEdit
Hôtel du Théâtre, Avenue Haldimand 5, ☏ +41 24 424 60 00, fax: +41 24 424 60 01, ✉ info@hotelyverdon.ch. Fr. 115/170 singles/doubles standard.
Grand Hôtel des Bains, Avenue des Bains 22, ☏ +41 24 424 64 64, fax: +41 24 424 64 65, ✉ reservation@grandhotelyverdon.ch. Fr. 200/280 singles/doubles standard.
Hôtel/Café-restaurant de la Prairie, Avenue des Bains 9, ☏ +41 24 423 31 31, fax: +41 24 425 00 79, ✉ contact@hotelprairie.ch. Fr. 165/245 singles/doubles.
Go nextEdit
The Jura Mountains: Sainte-Croix, Vallorbe, Vallée de Joux
Avenches and the ruins of the old roman city of Aventicum
This city travel guide to Yverdon is a usable article. It has information on how to get there and on restaurants and hotels. An adventurous person could use this article, but please feel free to improve it by editing the page.
Retrieved from "https://en.wikivoyage.org/w/index.php?title=Yverdon&oldid=4109025"
This travel guide page was last edited at 00:02, on 4 December 2020 by Wikivoyage user Wrh2Bot. Based on work by Wikivoyage users WOSlinker, Ibaman, Traveler100bot, ShakespeareFan00, Wauteurz, RJFF, Drat70 and Leloupdujura, Wikivoyage anonymous user 84.253.59.74 and others.