TL;DR: Object-Relational Mapping (ORM) makes it easier for developers to work with databases by automatically translating between code and data. ORMs boost productivity and code maintainability but can introduce performance and data integrity challenges if not managed carefully. Using complementary tools (such as caching, connection pooling, and migration frameworks) and following best practices helps teams…
MySQL Error: 1062 'Duplicate entry' Error
The all too common MySQL ‘Duplicate entry’ Error. mysql> show slave status\G; *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: master-mysql.local Master_User: repl Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.004768 Read_Master_Log_Pos: 1022786917 Relay_Log_File: relay-bin.001728 Relay_Log_Pos: 929659721 Relay_Master_Log_File: mysql-bin.004768 Slave_IO_Running: Yes Slave_SQL_Running: No Replicate_Do_DB: Replicate_Ignore_DB: information_schema,mysql Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 1062 Last_Error:…
Installing MariaDB 10.1 on CentOS 6.8
MariaDB is a fork of the MySQL; it is notable for being led by the original developers of MySQL and is community-developed. The original developers forked it due to concerns over its acquisition by Oracle. MariaDB intends to be a “drop-in” replacement for MySQL, ensuring capability with library binary and matching with MySQL APIs and…
Linux Mint
Linux Mint is a community-driven Linux distribution based on the popular Ubuntu and Debian. Initially released on August 10, 2006, and with ten years to grow, it has become one top desktop Linux distribution.
Querying Apache Hadoop Resource Manager with Python.
Querying Apache Hadoop Resource Manager with Python. I was recently asked to write a script that would monitor the running application on the Apache Hadoop Resource Manager. I wonder over to the Apache Hadoop Cluster Application Statistics API. The API allows to query most of the information that you see in the WEB UI. Information…
Resizing InnoDB Logs
If you have already created your database and you change the setting for “innodb_log_file_size=###M” and restart here you database and get an error that looks something like InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes Here what you need to do. 1.) Make sure your database shutdown clean. 2.) Move(not delete)…
MongoDB Script for counting records in collections in all the databases
Here is a quick script. I wrote for a co-worker. var host = “localhost” var port = 27000 var dbslist = db.adminCommand(‘listDatabases’); for( var d = 0; d < dbslist.databases.length; d++) { var db = connect(host+”:”+port+”/”+dbslist.databases[d].name); var collections = db.getCollectionNames(); for(var i = 0; i < collections.length; i++){ var name = collections[i]; if(name.substr(0, 6) !=…
Apache Oozie – Shell Script Example.
Recently I needed the ability to allow a user to submit jobs that required them to pass arguments to a shell script. While it’s easy enough to submit a job using a Web UI like HUE. I wanted to tie it to a homegrown SaaS solution that we were developing to allow developers to load datasets…
Installing MonetDB on CentOS/RedHat.
Hello world!
Disable 70-persistent-net.rules generation on CentOS 6 VM
If you’re like me you probably have an environment that is running on some virtual platform and like everyone else you have built a template to spin Linux systems. One of the things lately we were running into was the “70-persistent-net.rules”, which associated MAC address to Network interfaces. The easiest way I have found to…
