bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
#perform all steps from this tutorial till "A note about vsyscall" | |
https://docs.docker.com/samples/library/centos/ | |
#proceed with download and configuration steps from | |
https://www.edureka.co/blog/how-to-set-up-hadoop-cluster-with-hdfs-high-availability/ | |
#commit your container | |
#stop and remove running container | |
#create separate network |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
package com.jenkov; | |
import com.google.common.collect.ImmutableList; | |
import com.google.common.collect.Range; | |
import org.apache.commons.lang3.StringUtils; | |
import org.openjdk.jmh.annotations.*; | |
import org.openjdk.jmh.infra.Blackhole; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; |
private static final List<Pair<Pattern, String>> UA_PATTERN_TO_FRIENDLY_NAME = asList( | |
// IE | |
Pair.of(compile(""".*; MSIE ([.0-9]*);.*"""), "Internet Explorer"), | |
Pair.of(compile(""".*WOW64.*rv:([.0-9]*).*"""), "Internet Explorer"), | |
Pair.of(compile(""".*Trident.*rv:([.0-9]*).*"""), "Internet Explorer"), | |
Pair.of(compile(""".*IEMobile/([.0-9]*).*"""), "Internet Explorer Mobile"), | |
Pair.of(compile(""".*Windows Phone ([.0-9]*).*"""), "Internet Explorer Mobile"), | |
// Edge | |
Pair.of(compile(""".*EdgA/([.0-9]*).*"""), "Edge for Android"), | |
Pair.of(compile(""".*EdgiOS/([.0-9]*).*"""), "Edge for iOS"), |
Project ideaQuality of source code can be examined by many different tools, Checkstyle is one of them, but not the only one. Checkstyle team uses its own tool to check its sources. But there is no limit to perfection and we can make Checkstyle source code even better than it is now. The idea is to reuse and configure some other well-known static code analysers (PMD, Sonar, Eclipse, IntelliJ IDEA Inspection, HuntBugs, SpotBugs, Pitest) to run all rules, checks, inspections, validations, mutations on Checkstyle main and test source
public class TestBiFunction { | |
public static void main(String ... args){ | |
//don't want to resolve dates in constructor -> compile error | |
List<GroovyReportTask> reportTasks = ReportUtils.splitInterval(firstDay, today, | |
(dtStart, dtEnd) -> new GroovyReportTask(getScriptFile(), null, dtStart, dtEnd)); | |
} | |
public static <T extends ReportTask> List<T> splitInterval(Date startDay, Date endDayExclusive, int interval, BiFunction<Date, Date, T> builderForDay) { | |
Date startOfEndDay = DateUtil.startOfGMTDay(endDayExclusive); |