# download latest https://golang.org/dl/ wget https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz tar xzvf go1.6.3.linux-amd64.tar.gz # system wide install sudo mv go /usr/local/ # add system wide path
Tegan Snyder tegansnyder
I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.
Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.
Install the EPEL, Webtatic, and REMI repos
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Sometimes you may have a run away reindex process that aborted due to a MySQL connection error of some sorts. It may be useful to use the following MySQL commands to aid in debugging.
Determining if a lock exists
Magento Enterprise labels the reindex lock via the constant REINDEX_FULL_LOCK in app/code/core/Enterprise/Index/Model/Observer.php
Returns 1 is specified lock is free and can be acquired, 0 if it’s in use, NULL if an error occurs.
Determing the thread that is holding the lock
Using Apache Spark to Query a CSV Like with SQL like syntax.
Load up the spark shell with the appropriate package for csv parsing:
./bin/spark-shell --packages com.databricks:spark-csv_2.10:1.1.0
In the scala terminal type the following, referencing the path to your csv file. Example below:
I'm recieving a strange error on a new install of Spark. I have setup a small 3 node spark cluster on top of an existing hadoop instance. The error I get is the same for any command I try to run on pyspark shell I get the following error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/spark/python/pyspark/rdd.py", line 1041, in count return self.mapPartitions(lambda i: [sum(1 for _ in i)]).sum() File "/opt/spark/python/pyspark/rdd.py", line 1032, in sum return self.mapPartitions(lambda x: [sum(x)]).fold(0, operator.add) File "/opt/spark/python/pyspark/rdd.py", line 906, in fold
|SELECT `main_table`.*, (main_table.base_subtotal_with_discount*main_table.base_to_global_rate) AS `subtotal`, `cust_email`.`email`, `cust_fname`.`value` AS `firstname`, `cust_lname`.`value` AS `lastname`, CONCAT_WS(' ', cust_fname.value, cust_lname.value) AS `customer_name` FROM `sales_flat_quote` AS `main_table`|
|INNER JOIN `customer_entity` AS `cust_email` ON cust_email.entity_id = main_table.customer_id|
|INNER JOIN `customer_entity_varchar` AS `cust_fname` ON cust_fname.entity_id = main_table.customer_id AND cust_fname.attribute_id = 5|
|INNER JOIN `customer_entity_varchar` AS `cust_lname` ON cust_lname.entity_id = main_table.customer_id AND cust_lname.attribute_id = 7 WHERE (items_count != '0') AND (main_table.is_active = '1') AND (main_table.created_at >= '2014-06-15 00:00:00') ORDER BY updated_at DESC|
|Author: Tegan Snyder <email@example.com>|
|Example of running a Dataflow profile via command line|
|you can change the profile_id to the one you want to|
|run and issue:|
|time php manual-dataflow-profile.php|
|note you may need to increase the memory_limit in php cli's php_cli.ini|
|RHEL linux copy /etc/php.ini to /etc/php_cli.ini and make changes there then restart Apache.|