Skip to content

Instantly share code, notes, and snippets.

View aparnachaudhary's full-sized avatar

Aparna Chaudhary aparnachaudhary

View GitHub Profile

Maintain Business Glossary in (W3C) Standard Format

Context and Problem Statement

We want to maintain business glossary in the organization. Multiple Data Catalogs support Business Glossary but no standard format is used. W3C standard exists to maintain this information.

How to import business glossary maintained in W3C standard to DataHub Catalog?

Decision Drivers

package com.netflix.fenzo;
import com.netflix.fenzo.plugins.SpreadingFitnessCalculators;
import org.apache.mesos.Protos;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
import java.util.stream.Collectors;

Introduction

The glibc memory allocator, at least in some versions of Linux, has an optimization to improve speed by avoiding contention when a process has a large number of concurrent threads. The supposed speedup is achieved by maintaining per-core memory pools. Essentially, with this optimization, the OS grabs memory for a given process in pretty big same-size (64MB) chunks called arenas, which are clearly visible when process memory is analyzed with pmap. Each arena is available only to its respective CPU core, so no more than one thread at a time can operate on it. Then, individual malloc() calls reserve memory within these arenas. Up to a certain maximum number of arenas (8 by default) can be allocated per each CPU core. Looks like this is maxed out when the number of threads is high and/or threads are created and destroyed frequently. The actual amount of memory utilized by the application within these arenas can be quite small. However, if an application has a large number of threads, and the ma

Benefits of Library based approach

Drawbacks Library based approach

  • Probably the most expensive challenge, even when using a library like Finagle, is that an organisation will still need to invest time from its engineering team in building the glue that links the libraries with the rest of their ecosystem. Based on my experiences at SoundCloud and DigitalOcean I would estimate that following this strategy in a 100-250 engineers organisation, one would need to dedicate 1/10 of the staff to building tooling. Sometimes this cost is explicit as engineers are assigned to teams dedicated to building tooling, but more often the price tag is invisible as it manifests itself as time taken away from working on your products.

  • A second issue is that the setup above limits the tools, runtimes, and languages you can use for your microservices. Libraries for microservices are often written for a specific platform, be it a programming language or a runtime like the JVM. If an organisation uses platforms other tha

Liveness:

  • Include only those checks which you think, if fails, will get cured with a pod restart

  • Health-check endpoints are called frequently and within fixed intervals, therefore your latencies should ideally be small. Enforce an overall upper bound for your health-check response and make sure to cancel any pending checks to the downstream dependencies in case of timeout.

  • If you are performing multiple dependency checks over the network, try to process them concurrently, if possible, to reduce the overall response time.

Readiness:

  • Checks that would prevent faulty app from deployment e.g. wrong URL’s for depdenencies

MesosCon EU 2017

  • Nested Containerization (via UCR)

    • Zip/Docker/Jar

    • Jenkins

    • K8

  • Local and External Resource Providers

  • Major installations are on-premise

  • Hierarichal fair-share, quota and reservations *

Change Log pattern to report line number in Spring Boot

Add logback.xml on the classpath.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
    <property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/spring.log}"/>

DCOS vagrant ubuntu

  • sudo apt-get install python3

  • sudo apt-get install python3-pip

  • pip3 install virtualenv

  • vagrant plugin install vagrant-hostmanager

  • cd ~/dev/tools/dcos/dcos-vagrant-1.2.0

  • cp VagrantConfig.yaml.example VagrantConfig.yaml

  • Reduce the memory of agent node to 1GB i.s.o. 6GB

  • Update etc/config-1.9.yml add oauth_enabled: false