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
| package ru.sber | |
| import org.apache.spark.sql.SparkSession | |
| object SimpleApp { | |
| def main(args: Array[String]) { | |
| val spark = SparkSession.builder.master("local").getOrCreate() | |
| import spark.implicits._ | |
| Seq( |
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
| package ru.sber | |
| import org.apache.spark.sql.SparkSession | |
| object SimpleApp { | |
| def main(args: Array[String]) { | |
| val spark = SparkSession.builder.master("local").getOrCreate() | |
| import spark.implicits._ | |
| Seq( |
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
| #!/bin/sh | |
| set -e | |
| set -x | |
| for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
| do | |
| npm -g install "$package" | |
| done |
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
| package object time { | |
| // Unboxed newtypes, credit to @milessabin and @retronym | |
| type Tagged[U] = { type Tag = U } | |
| type @@[T, U] = T with Tagged[U] | |
| class Tagger[U] { def apply[T](t : T) : T @@ U = t.asInstanceOf[T @@ U] } | |
| def tag[U] = new Tagger[U] | |
| trait Day |
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
| import java.util.HashMap; | |
| import java.util.UUID; | |
| import java.util.concurrent.ConcurrentHashMap; | |
| import java.util.concurrent.TimeUnit; | |
| import scala.collection.concurrent.TrieMap; | |
| import org.openjdk.jmh.annotations.*; | |
| @BenchmarkMode(Mode.AverageTime) |
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
| package org.myorg.quickstart; | |
| import org.apache.flink.api.common.functions.CoGroupFunction; | |
| import org.apache.flink.api.common.functions.MapFunction; | |
| import org.apache.flink.api.java.DataSet; | |
| import org.apache.flink.api.java.ExecutionEnvironment; | |
| import org.apache.flink.api.java.operators.DataSource; | |
| import org.apache.flink.api.java.tuple.Tuple2; | |
| import org.apache.flink.util.Collector; |
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
| public class FinishingCountTrigger<W extends Window> extends Trigger<Object, W> { | |
| private static final long serialVersionUID = 1L; | |
| private final long maxCount; | |
| private final ValueStateDescriptor<Long> stateDesc = new ValueStateDescriptor<>("count", LongSerializer.INSTANCE, 0L); | |
| public FinishingCountTrigger(long maxCount) { | |
| this.maxCount = maxCount; | |
| } |
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
| import java.sql.Timestamp | |
| import java.util.concurrent.TimeUnit | |
| import org.apache.flink.streaming.api.functions.source.FileMonitoringFunction | |
| import org.apache.flink.streaming.api.functions.source.FileMonitoringFunction.{ WatchType} | |
| import org.apache.flink.streaming.api.scala._ | |
| import org.apache.flink.streaming.api.windowing.time.Time | |
| import org.apache.flink.streaming.api.windowing.triggers.ContinuousProcessingTimeTrigger | |
| object DistinctCountTest { |
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
| import org.apache.flink.api.common.io.OutputFormat | |
| import org.apache.flink.configuration.Configuration | |
| import org.apache.hadoop.hbase._ | |
| import client._ | |
| import util.Bytes | |
| import language.{ implicitConversions, reflectiveCalls } | |
| import java.math.BigDecimal | |
| import java.nio.ByteBuffer |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <packaging>pom</packaging> | |
| <!-- =========== --> | |
| <!-- = General = --> | |
| <!-- =========== --> | |
| <groupId>com.logisima.search</groupId> | |
| <artifactId>crawler</artifactId> |