This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Failed to instantiate [ch.qos.logback.classic.LoggerContext] | |
Reported exception: | |
ch.qos.logback.core.LogbackException: Failed to initialize or to run Configurator: ch.qos.logback.classic.util.DefaultJoranConfigurator | |
at ch.qos.logback.classic.util.ContextInitializer.invokeConfigure(ContextInitializer.java:133) | |
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:103) | |
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:66) | |
at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:52) | |
at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41) | |
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:199) | |
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:186) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "StsAccess", | |
"Effect": "Allow", | |
"Action": [ | |
"sts:AssumeRole", | |
"iam:*Role*" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import React from 'react'; | |
import {descending, max} from "d3-array"; | |
import {entries} from "d3-collection"; | |
import {select} from "d3-selection"; | |
import {scaleLinear} from "d3-scale"; | |
import "./BarChart.scss"; | |
import ChartTooltip from "./components/ChartTooltip"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import React from 'react'; | |
import {descending, max} from "d3-array"; | |
import {entries} from "d3-collection"; | |
import {scaleLinear} from "d3-scale"; | |
import "./BarChart.scss"; | |
import ChartTooltip from "./components/ChartTooltip"; | |
type Props = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stream.foreachRDD { rdd => | |
val offsetRanges = rdd.asInstanceOf[HasOffsetRanges].offsetRanges | |
// DO YOUR STUFF with DATA | |
stream.asInstanceOf[CanCommitOffsets].commitAsync(offsetRanges) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
streamingContext.start() | |
streamingContext.awaitTermination() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stream.map(record => record.value) | |
.flatMap(line => line.split("[ ,\\.;:\\-]+")) | |
.map(word => word.toLowerCase) | |
.filter(_.size > 0) | |
.map(word => (word, 1)) | |
.reduceByKey(_ + _) | |
.repartition(1) | |
.transform(rdd => rdd.sortBy(-_._2)) | |
.saveAsTextFiles("./output/words") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val stream = KafkaUtils.createDirectStream[String, String]( | |
streamingContext, | |
PreferConsistent, | |
Subscribe[String, String](topics, kafkaParams) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val topics = Array("text") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val kafkaParams = Map[String, Object]( | |
"bootstrap.servers" -> "localhost:9092", | |
"key.deserializer" -> classOf[StringDeserializer], | |
"value.deserializer" -> classOf[StringDeserializer], | |
"group.id" -> "kafka_demo_group", | |
"auto.offset.reset" -> "earliest", | |
"enable.auto.commit" -> (true: java.lang.Boolean) | |
) |