Ben Chuanlong Du's Blog

It is never too late to learn.

Reduce Size of Git Repository

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Use Git Large File Storage to Manage Large Files

Git Large File Storage (Git-LFS) is the recommended way to work with large files. Please read the following if have already committed …

Memory Layout in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Different Types of Memory in Rust

Rust has 3 different types of memory: static memory, stack memory and heap memory.

  1. Static variables live in static memory and is determined at compile time. It is suggested that you define large data variables as static so that they live in the static memory instead of stack memory to avoid stack overflow problems. Of course, another way is to put those variables into heap memory (but at the cost of slight performance loss).

Get Size of Tables on HDFS

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

The HDFS Way

You can use the hdfs dfs -du /path/to/table command or hdfs dfs -count -q -v -h /path/to/table to get the size of an HDFS path (or table). However, this only works if the cluster supports HDFS. If a Spark cluster exposes only JDBC/ODBC APIs, this method does not work.

Use the ulimit Command to Control the Stack Size

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

http://en.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/x4733.html

https://stackoverflow.com/questions/14471564/what-does-ulimit-s-unlimited-do

https://access.redhat.com/solutions/384633