Logs can be sent to GCP logging very simple.
You need to install the package google-cloud-logging
.
Then the code will looks somehting like this:
I accumulate here the list of articles which have interesting information about Apache Airflow. Subjects of the articles covers topics from installation and management to implementation of DAGs and best practices.
Here I gathered answers to small pitfalls which from time to time appears because you’re not doing some actions often. Such actions include using of .dockerignore
, mounting files, SSL certificates for web servers in containers, etc.
docker build
command.COPY filetoignore.txt .
and you are ignoring such file(s) in .dockerignore
, you’ll get an errordocker build
and not to the one where your Dockerfile is located.A glance under the hood to what happens in memory when you do operations upon Pandas DataFrame and its columns. In monitoring I’ll use the library memory_profiler and use it in Jupyter Notebook as described here.
Since the module is using Python scripts its usage a little bit wired. The general approach is to create a method which I want to profile and execute it by means of magic code %mprun.
Sparse checkout | |
From scratch (enable) | |
1) $ git init | |
2) $ git remote add -f origin URL | |
3) $ git config core.sparseCheckout true | |
4) create a file with exclusion rules: /.git/info/sparse-checkout | |
5) $ git pull origin master | |
On already cloned folder |
import os | |
import sys | |
# it's required to work in Airflow with packages | |
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) | |
from airflow import DAG | |
from airflow.utils.dates import days_ago | |
from airflow.utils.trigger_rule import TriggerRule | |
from airflow.operators.dummy import DummyOperator |
public class BulletTrainRemoteConfiguration : IRemoteConfiguration | |
{ | |
private readonly string _userIdentity; | |
private static readonly object LockObject = new object(); | |
public BulletTrainRemoteConfiguration(RemoteConfigurationSettings settings) | |
{ | |
if (BulletTrainClient.instance == null) | |
lock (LockObject) | |
if (BulletTrainClient.instance == null) |
// main interface | |
public interface IRemoteConfiguration | |
{ | |
Task<List<Feature>> GetFeatures(); | |
Task<List<Setting>> GetSettings(List<string> keys = null); | |
Task<bool> IsFeatureEnabled(string key); | |
Task<string> GetSettingValue(string key); | |
} | |
// other classes | |
public abstract class RemoteConfigEntry |
version: '2' | |
services: | |
zookeeper1: | |
restart: always | |
image: wurstmeister/zookeeper:latest | |
container_name: zookeeper1 | |
ports: | |
- "2181:2181" | |
kafka1: |